Skip to content
Browse files

added or case for older versions of node

  • Loading branch information...
1 parent 7af65a9 commit 4cf155a1624b3fb54b2eec536a0c060ec1bab4ab @gtanner gtanner committed May 2, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/jsdom/level2/languages/javascript.js
View
2 lib/jsdom/level2/languages/javascript.js
@@ -1,5 +1,5 @@
var Context = process.binding('evals').Context,
- Script = process.binding('evals').NodeScript;
+ Script = process.binding('evals').NodeScript || process.binding('evals').Script;
exports.javascript = function(element, code, filename) {
var document = element.ownerDocument,

6 comments on commit 4cf155a

@gtanner

It doesn't look the npm package was updated for this yet:

npm update jsdom still contains the old code.

@jstsch
jstsch commented on 4cf155a Jun 3, 2011

Would be good to update the package asap, since the examples on the homepages don't work when you're using npm at this time (with node 0.4.8). (TypeError: Cannot call method 'runInContext' of undefined)

@lancefisher

What is the best approach to using this until it's in npm? I just manually edited my file in /Users/lancefisher/node_modules/jsdom/lib/jsdom/level2/languages/javascript.js to change that line, and it seems to work, but I'm just hacking my way through things. Thanks.

@gtanner

That is what I have been doing.

@tmpvar
Owner
tmpvar commented on 4cf155a Jul 11, 2011

npm install https://github.com/tmpvar/jsdom/tarball/4cf155a1624b3fb54b2eec536a0c060ec1bab4ab

this also works in package.json

"dependencies" : {
  "jsdom" : "https://github.com/tmpvar/jsdom/tarball/4cf155a1624b3fb54b2eec536a0c060ec1bab4ab"
}

jsdom 0.3.0 should hit npm at the end of this week (just need to fix more bugs and get some of the half-baked functionality finished). If you have some spare cycles, let me know, I'd love the help!

@lancefisher

Thanks tmpvar! I didn't know you could do that with npm.

Please sign in to comment.
Something went wrong with that request. Please try again.