From: John Resig Date: Sat, 16 Apr 2011 21:18:56 +0000 (-0700) Subject: Cache references to navigator and location. Fixes #6690. X-Git-Tag: 1.6rc1~13 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=94ee3e9743c2cab24084ae24e02871f6df4aef13;p=jquery.git Cache references to navigator and location. Fixes #6690. --- diff --git a/src/ajax.js b/src/ajax.js index 2a1076391..4f8fee6c1 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -45,9 +45,9 @@ var r20 = /%20/g, ajaxLocParts; // #8138, IE may throw an exception when accessing -// a field from document.location if document.domain has been set +// a field from window.location if document.domain has been set try { - ajaxLocation = document.location.href; + ajaxLocation = location.href; } catch( e ) { // Use the href attribute of an A element // since IE will modify it given document.location diff --git a/src/intro.js b/src/intro.js index c0a5643ff..a81c86f92 100644 --- a/src/intro.js +++ b/src/intro.js @@ -16,4 +16,6 @@ (function( window, undefined ) { // Use the correct document accordingly with window argument (sandbox) -var document = window.document; +var document = window.document, + navigator = window.navigator, + location = window.location;