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
(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;