Store references to location and navigator objects
|Reported by:||jos3000||Owned by:||john|
I'm using jsdom to run jQuery on node.js
In the main example: http://github.com/tmpvar/jsdom/blob/master/example/jquery/run.js
the variables 'window', 'document', 'navigator' and 'location' are defined in the scope before query is run. For neatness I tried to remove all but 'window' since jQuery starts by wrapping all the code in a closure with only 'window' as an argument.
It turns out that it still requires 'navigator' and 'location' to be defined.
Would it be possible to add: var navigator = window.navigator, location = window.location; to the core so that the sandbox is complete? This is already done with 'document'.
I know this should work, but wonder if there is a browser compatibility reason that this would break.
Change History (3)
comment:1 Changed 6 years ago by snover
- Milestone changed from 1.4.3 to 1.5
- Priority set to low
- Status changed from new to open
- Summary changed from Sandbox leaks to Store references to location and navigator objects
- Version changed from 1.4.2 to 1.4.3
comment:2 Changed 6 years ago by john
- Milestone set to 1.6
- Owner set to john
- Status changed from open to assigned