Cache references to navigator and location. Fixes #6690.
This commit is contained in:
parent
5b197b6c5f
commit
94ee3e9743
2 changed files with 5 additions and 3 deletions
|
@ -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 @@
|
||||||
(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;
|
||||||
|
|
Loading…
Reference in a new issue