Commit c5315f66 authored by John Resig's avatar John Resig

Scope 'document' locally (also useful for sandboxing). Patch from Andrea...

Scope 'document' locally (also useful for sandboxing). Patch from Andrea Giammarchi. Fixes bug #4905.
parent 7a04d1da
...@@ -12,6 +12,9 @@ var jQuery = function( selector, context ) { ...@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment