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
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


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

npm update jsdom still contains the old code.

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)


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.


That is what I have been doing.

tmpvar commented on 4cf155a Jul 11, 2011

npm install

this also works in package.json

"dependencies" : {
  "jsdom" : ""

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!


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.