Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cache references to navigator and location. Fixes #6690.

  • Loading branch information...
commit 94ee3e9743c2cab24084ae24e02871f6df4aef13 1 parent 5b197b6
@jeresig jeresig authored
Showing with 5 additions and 3 deletions.
  1. +2 −2 src/ajax.js
  2. +3 −1 src/intro.js
View
4 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
View
4 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;
Please sign in to comment.
Something went wrong with that request. Please try again.