mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Cache references to navigator and location. Fixes #6690.
This commit is contained in:
parent
5b197b6c5f
commit
94ee3e9743
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user