Commit c68fbc20 authored by jeresig's avatar jeresig

There's enough logic going on in jQuery.ajaxSettings.xhr to warrant splitting...

There's enough logic going on in jQuery.ajaxSettings.xhr to warrant splitting the function based upon the functionality.
parent 84dd82eb
...@@ -178,16 +178,15 @@ jQuery.extend({ ...@@ -178,16 +178,15 @@ jQuery.extend({
// implement the XMLHttpRequest in IE7 (can't request local files), // implement the XMLHttpRequest in IE7 (can't request local files),
// so we use the ActiveXObject when it is available // so we use the ActiveXObject when it is available
// This function can be overriden by calling jQuery.ajaxSetup // This function can be overriden by calling jQuery.ajaxSetup
xhr: function() { xhr: window.XMLHttpRequest && (window.location.protocol !== "file:" || !window.ActiveXObject) ?
if ( window.XMLHttpRequest && (window.location.protocol !== "file:" || !window.ActiveXObject) ) { function() {
return new window.XMLHttpRequest(); return new window.XMLHttpRequest();
} :
} else { function() {
try { try {
return new window.ActiveXObject("Microsoft.XMLHTTP"); return new window.ActiveXObject("Microsoft.XMLHTTP");
} catch(e) {} } catch(e) {}
} },
},
accepts: { accepts: {
xml: "application/xml, text/xml", xml: "application/xml, text/xml",
html: "text/html", html: "text/html",
......
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