]> source.dussan.org Git - jquery.git/commitdiff
Scope 'document' locally (also useful for sandboxing). Patch from Andrea Giammarchi...
authorJohn Resig <jeresig@gmail.com>
Wed, 15 Jul 2009 12:35:57 +0000 (12:35 +0000)
committerJohn Resig <jeresig@gmail.com>
Wed, 15 Jul 2009 12:35:57 +0000 (12:35 +0000)
src/core.js

index cab3b54c3a55e7d9c90e8a4c21400eccdefa45e7..ee4ac7051499a8ea7b81dd1fa362b0ee64196292 100644 (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,