console-global-js.mustache revision b96d996309309541dc72ee198c96c06e1b16bbfe
<script type="text/javascript">
// Create the first YUI instance
YUI().use("node", function (Y) {
Y.one( "#yui1" ).on( "click", function () {
Y.log( "Message from YUI instance #1" );
});
});
// Create the second YUI instance
YUI().use("node", function (Y) {
Y.one( "#yui2" ).on( "click", function () {
Y.log( "I'm the second YUI instance" );
});
});
// Create a third YUI instance
YUI().use("node", function (Y) {
Y.one( "#yui3" ).on( "click", function () {
Y.log( "And this is #3 YUI" );
});
});
// Create a separate YUI instance to listen to all instances' logging
YUI(<?php echo($yuiConfig); ?>).use("console", function (Y) {
// Configure the Console's logSource to Y.Global to make it universal
new Y.Console({
logSource: Y.Global,
style: 'block',
newestOnTop: false,
width: "250px"
}).render( "#yconsole" );
});
</script>