Commit 94ee3e97 authored by John Resig's avatar John Resig

Cache references to navigator and location. Fixes #6690.

parent 5b197b6c
...@@ -45,9 +45,9 @@ var r20 = /%20/g, ...@@ -45,9 +45,9 @@ var r20 = /%20/g,
ajaxLocParts; ajaxLocParts;
// #8138, IE may throw an exception when accessing // #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 { try {
ajaxLocation = document.location.href; ajaxLocation = location.href;
} catch( e ) { } catch( e ) {
// Use the href attribute of an A element // Use the href attribute of an A element
// since IE will modify it given document.location // since IE will modify it given document.location
......
...@@ -16,4 +16,6 @@ ...@@ -16,4 +16,6 @@
(function( window, undefined ) { (function( window, undefined ) {
// Use the correct document accordingly with window argument (sandbox) // Use the correct document accordingly with window argument (sandbox)
var document = window.document; var document = window.document,
navigator = window.navigator,
location = window.location;
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