jquery ajax: extends #3087. The xhr factory is now an ajax setting called 'xhr' instead of a method (jQuery.getAjaxTransport).
This commit is contained in:
parent
b8ceedbe2b
commit
9d9c4d2a51
15
src/ajax.js
15
src/ajax.js
|
@ -114,13 +114,6 @@ jQuery.extend({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// Create the request object; Microsoft failed to properly
|
|
||||||
// implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
|
|
||||||
getAjaxTransport : function() {
|
|
||||||
return window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
getScript: function( url, callback ) {
|
getScript: function( url, callback ) {
|
||||||
return jQuery.get(url, null, callback, "script");
|
return jQuery.get(url, null, callback, "script");
|
||||||
},
|
},
|
||||||
|
@ -159,6 +152,12 @@ jQuery.extend({
|
||||||
data: null,
|
data: null,
|
||||||
username: null,
|
username: null,
|
||||||
password: null,
|
password: null,
|
||||||
|
// Create the request object; Microsoft failed to properly
|
||||||
|
// implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
|
||||||
|
// This function can be overriden by calling jQuery.ajaxSetup
|
||||||
|
xhr:function(){
|
||||||
|
return window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
|
||||||
|
},
|
||||||
accepts: {
|
accepts: {
|
||||||
xml: "application/xml, text/xml",
|
xml: "application/xml, text/xml",
|
||||||
html: "text/html",
|
html: "text/html",
|
||||||
|
@ -282,7 +281,7 @@ jQuery.extend({
|
||||||
var requestDone = false;
|
var requestDone = false;
|
||||||
|
|
||||||
// Create the request object
|
// Create the request object
|
||||||
var xhr = jQuery.getAjaxTransport();
|
var xhr = s.xhr();
|
||||||
|
|
||||||
// Open the socket
|
// Open the socket
|
||||||
// Passing null username, generates a login popup on Opera (#2865)
|
// Passing null username, generates a login popup on Opera (#2865)
|
||||||
|
|
Loading…
Reference in a new issue