mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
There's enough logic going on in jQuery.ajaxSettings.xhr to warrant splitting the function based upon the functionality.
This commit is contained in:
parent
84dd82eb1a
commit
c68fbc2071
@ -178,15 +178,14 @@ jQuery.extend({
|
||||
// implement the XMLHttpRequest in IE7 (can't request local files),
|
||||
// so we use the ActiveXObject when it is available
|
||||
// This function can be overriden by calling jQuery.ajaxSetup
|
||||
xhr: function() {
|
||||
if ( window.XMLHttpRequest && (window.location.protocol !== "file:" || !window.ActiveXObject) ) {
|
||||
xhr: window.XMLHttpRequest && (window.location.protocol !== "file:" || !window.ActiveXObject) ?
|
||||
function() {
|
||||
return new window.XMLHttpRequest();
|
||||
|
||||
} else {
|
||||
} :
|
||||
function() {
|
||||
try {
|
||||
return new window.ActiveXObject("Microsoft.XMLHTTP");
|
||||
} catch(e) {}
|
||||
}
|
||||
},
|
||||
accepts: {
|
||||
xml: "application/xml, text/xml",
|
||||
|
Loading…
Reference in New Issue
Block a user