Skip to content

Instantly share code, notes, and snippets.

@morganrallen
Created March 4, 2011 06:49
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 morganrallen/854278 to your computer and use it in GitHub Desktop.
Save morganrallen/854278 to your computer and use it in GitHub Desktop.
var jsdom = require("jsdom"),
fs = require("fs");
fs.readFile("test.html", function(err, content) {
if(err) throw err;
var doc = jsdom.jsdom(content, jsdom.defaultLevel);
doc.addEventListener("load", function() {
console.log(arguments);
}, false);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment