Skip to content
Permalink
Browse files

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

…plitting the function based upon the functionality.
  • Loading branch information
jeresig committed Jan 7, 2010
1 parent 84dd82e commit c68fbc2071f67876edbb3fca202362aecb82ca9c
Showing with 5 additions and 6 deletions.
  1. +5 −6 src/ajax.js
@@ -178,16 +178,15 @@ 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",
html: "text/html",

0 comments on commit c68fbc2

Please sign in to comment.
You can’t perform that action at this time.