Scope 'document' locally (also useful for sandboxing). Patch from Andrea Giammarchi. Fixes bug #4905.
This commit is contained in:
parent
7a04d1da54
commit
c5315f6687
1 changed files with 3 additions and 0 deletions
|
@ -12,6 +12,9 @@ var jQuery = function( selector, context ) {
|
|||
// Map over the $ in case of overwrite
|
||||
_$ = window.$,
|
||||
|
||||
// Use the correct document accordingly with window argument (sandbox)
|
||||
document = window.document,
|
||||
|
||||
// A central reference to the root jQuery(document)
|
||||
rootjQuery,
|
||||
|
||||
|
|
Loading…
Reference in a new issue