Skip to content

Instantly share code, notes, and snippets.

@tmpvar
Created February 16, 2010 03:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmpvar/305272 to your computer and use it in GitHub Desktop.
Save tmpvar/305272 to your computer and use it in GitHub Desktop.
A HUUUUUGE MILESTONE
// ... other setup
doc.innerHTML = '<html><head></head><body><div class="who"></div></body></html>';
var window = {
alert : function() { sys.puts(sys.inspect(arguments)); },
document : doc
};
window.Sizzle = require("../sizzle/sizzle").sizzleInit(window, doc);
var $ = require("./pure").pureInit(window, doc);
$("div").autoRender({"who":"Hello Wrrrld"});
sys.puts(doc.innerHTML);
/* ... output
tmpvar@tmpvar:~/Work/Javascript/jsdom/example/pure$ node run.js
<html><head></head><body><div class="who">Hello Wrrrld</div></body></html>
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment