Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Cache references to navigator and location. Fixes #6690.

  • Loading branch information...
commit 94ee3e9743c2cab24084ae24e02871f6df4aef13 1 parent 5b197b6
John Resig authored April 16, 2011

Showing 2 changed files with 5 additions and 3 deletions. Show diff stats Hide diff stats

  1. 4  src/ajax.js
  2. 4  src/intro.js
4  src/ajax.js
@@ -45,9 +45,9 @@ var r20 = /%20/g,
45 45
 	ajaxLocParts;
46 46
 
47 47
 // #8138, IE may throw an exception when accessing
48  
-// a field from document.location if document.domain has been set
  48
+// a field from window.location if document.domain has been set
49 49
 try {
50  
-	ajaxLocation = document.location.href;
  50
+	ajaxLocation = location.href;
51 51
 } catch( e ) {
52 52
 	// Use the href attribute of an A element
53 53
 	// since IE will modify it given document.location
4  src/intro.js
@@ -16,4 +16,6 @@
16 16
 (function( window, undefined ) {
17 17
 
18 18
 // Use the correct document accordingly with window argument (sandbox)
19  
-var document = window.document;
  19
+var document = window.document,
  20
+	navigator = window.navigator,
  21
+	location = window.location;

0 notes on commit 94ee3e9

Please sign in to comment.
Something went wrong with that request. Please try again.