node.html revision 63898dadaf6dd411a13dd8ba0e89f6edbc715363
<html debug="true">
<head>
<title>YUI 3.0</title>
<!--
<script type="text/javascript" src="/build/oop/oop-debug.js"></script>
<script type="text/javascript" src="/build/event-custom/event-custom-debug.js"></script>
<script type="text/javascript" src="/build/event/event-debug.js"></script>
<script type="text/javascript" src="/build/dom/dom.js"></script>
<script type="text/javascript" src="/build/node/node.js"></script>
<script type="text/javascript" src="/build/dump/dump.js"></script>
<script type="text/javascript" src="/build/substitute/substitute.js"></script>
-->
<body>
<div id="container">
<div id="n1">1</div>
<div id="n2">2</div>
<div id="n3">3</div>
</div>
<div id="echo"></div>
<script>
if (typeof loadFirebugConsole == 'function') {
loadFirebugConsole();
}
var yui_config = {
// add MVP specific includes here, they will then be available to any
// YUI instantiation like: YUI(yui_config)
modules: {
'columnpicker-column': {
path: "/columnpicker/column.js"
},
},
base: function(o){
var nodes = document.getElementsByTagName('script'), i;
base = match && match[1];
if (base) {
break;
}
}
return base;
}(),
}
YUI(yui_config).use('node', function(Y) {
});
});
});
//
});
var yui_config = {};
// // capture base in regexp, capture all variation of the yui file,
// // allow querystring, common in cache-busting and versioning schemes
// base = match && match[1];
// if (base) {
// Y.log(base);
// yui_config.base = base;
// return true;
// }
// });
// var match = nodes[i].src.match(/^(.*)yui[\.-].*js(\?.*)?$/);
// base = match && match[1];
// if (base) {
// Y.log(base);
// yui_config.base = base;
// break;
// }
// }
var node = Y.get('#container');
node.addAttr('foo', {value: 'foo'});
node.set('foo', 'bar'); // set an attribute
});
/*
(function(){
var divs = YAHOO.util.Dom.getElementsBy(function(el){return true}, "div", "container");
var objEl = {};
var echo = YAHOO.util.Dom.get("echo");
objEl[divs[i].id].setAttributeConfig("clicks",
{
value : 0
}
);
objEl[divs[i].id].subscribe("clicksChange", function(args) {
});
}
clicks += 1;
});
})();
*/
</script>
<form id="form1" name="form1">
<input id="text1" type="text" value="keylistener" class="nothing" />
</form>
</body>
</html>