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