Skip to content

Commit

Permalink
Merge pull request davglass#16 from insaindesign/master
Browse files Browse the repository at this point in the history
Error in latest jsdom (0.2.5)
  • Loading branch information
davglass committed Sep 29, 2011
2 parents 49d6012 + 6eee70a commit cffed63
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/yui3-dom.js
Expand Up @@ -8,7 +8,7 @@ YUI.add('nodejs-dom', function(Y) {

var jsdom = null,
browser = {}, dom;

if (!YUI._jsdom) {
YUI._jsdom = YUI.require('jsdom');
}
Expand All @@ -22,9 +22,9 @@ YUI.add('nodejs-dom', function(Y) {
FetchExternalResources: [],
ProcessExternalResources : false
}
browser.window = jsdom.jsdom('', null, {features: features}).createWindow();
browser.document = browser.window.document;
browser.document = jsdom.jsdom('<html><head></head><body></body></html>', null, {features: features});
browser.window = browser.document.createWindow();

// Setup an html doctype
var doctype = new dom.DocumentType(browser.document, 'html');
browser.document.doctype = doctype;
Expand All @@ -34,7 +34,7 @@ YUI.add('nodejs-dom', function(Y) {

browser.document.scrollTop = browser.document.documentElement.scrollTop = browser.document.body.scrollTop = 0;
browser.document.scrollLeft = browser.document.documentElement.scrollLeft = browser.document.body.scrollLeft = 0;

browser.window.eval = eval;

browser.self = browser.window;
Expand Down

0 comments on commit cffed63

Please sign in to comment.