tmpvar/jsdom — Issue #355: No way to disable running JS in body?
Author: edmellum
Created: 2011-11-02 16:25:30+00:00
State: open

If I just try to load google.com into jsdom like this:

```javascript
var jsdom = require('jsdom');

jsdom.env({
html: 'http://google.com/',
done: function(){}
});
```

I getting this error:

```
error: Dispatching event 'load' failed. - More:
[object Object]
TypeError: Cannot call method 'call' of undefined
at new (/home/david/a2g_panel/node_modules/jsdom/lib/jsdom/browser/index.js:16:15)
at Object. (unknown source)
at /home/david/a2g_panel/node_modules/jsdom/lib/jsdom/level1/core.js:1007:50
at Object. (/home/david/a2g_panel/node_modules/jsdom/lib/jsdom/level2/events.js:290:17)
at Object.dispatchEvent (/home/david/a2g_panel/node_modules/jsdom/lib/jsdom/browser/index.js:141:40)
at Object. (/home/david/a2g_panel/node_modules/jsdom/lib/jsdom/browser/index.js:55:16)
at Function.dispatch (/home/david/a2g_panel/node_modules/jsdom/lib/jsdom/level2/events.js:195:42)
at Object.dispatchEvent (/home/david/a2g_panel/node_modules/jsdom/lib/jsdom/level2/events.js:285:33)
at /home/david/a2g_panel/node_modules/jsdom/lib/jsdom/level2/html.js:61:15
at Object.check (/home/david/a2g_panel/node_modules/jsdom/lib/jsdom/level2/html.js:277:11)
```

My conclusion from this is that jsdom is running some of the Javascript that's in the body of the site. Is there any way to disable this?