Scope 'document' locally (also useful for sandboxing). Patch from Andrea Giammarchi. Fixes bug #4905.

This commit is contained in:
John Resig 2009-07-15 12:35:57 +00:00
parent 7a04d1da54
commit c5315f6687

View File

@ -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,