mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
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 New Issue
Block a user