public

  • Download Gist
nodejs-yui3_append_and_one.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#!/usr/bin/env node
 
var sys = require('sys'),
YUI = require('yui3').YUI;
YUI().use('node',function(Y){
Y.one('body').append('<div id="ala">ala ma kota</div>');
var ala = Y.one('#ala');
Y.log(ala);
document = Y.Browser.document;
ala = document.getElementById('ala');
Y.log(ala);
var el = document.createElement('div');
document.body.appendChild(el);
el.id = 'ola';
var ola = Y.one('#ola');
Y.log(ola);
ola.set('innerHTML','ola ma psa');
sys.puts(document.outerHTML);
});

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.