Commit ad6e422c authored by Chris Antaki's avatar Chris Antaki Committed by Michał Gołębiowski

Ajax: Remove workaround for IE6/7

(cherry-picked from e5190982c40d7ac8ab9bdb2e7e4334f0e123ef66)

Closes gh-1597
Ref #8138
parent e488d985
...@@ -10,10 +10,6 @@ define([ ...@@ -10,10 +10,6 @@ define([
], function( jQuery, rnotwhite, nonce, rquery ) { ], function( jQuery, rnotwhite, nonce, rquery ) {
var var
// Document location
ajaxLocParts,
ajaxLocation,
rhash = /#.*$/, rhash = /#.*$/,
rts = /([?&])_=[^&]*/, rts = /([?&])_=[^&]*/,
rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
...@@ -42,22 +38,13 @@ var ...@@ -42,22 +38,13 @@ var
transports = {}, transports = {},
// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
allTypes = "*/".concat("*"); allTypes = "*/".concat( "*" ),
// Support: IE6 // Document location
// Exception accessing window.location.href if document.domain is set (#8138) ajaxLocation = location.href,
try {
ajaxLocation = location.href;
} catch( e ) {
// Use the href attribute of an A element
// since IE will modify it given document.location
ajaxLocation = document.createElement( "a" );
ajaxLocation.href = "";
ajaxLocation = ajaxLocation.href;
}
// Segment location into parts // Segment location into parts
ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
function addToPrefiltersOrTransports( structure ) { function addToPrefiltersOrTransports( structure ) {
......
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