mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Removed bind/unbind from xhr emulation: success/error/complete are deferred not events so these methods didn't really make sense in the first place.
This commit is contained in:
parent
8ab5e1e45c
commit
9d3a4a2b40
17
src/xhr.js
17
src/xhr.js
@ -597,23 +597,6 @@ jQuery.xhr = function( _native ) {
|
|||||||
reset(1);
|
reset(1);
|
||||||
|
|
||||||
// Install callbacks related methods
|
// Install callbacks related methods
|
||||||
jQuery.each(["bind","unbind"], function(_, name) {
|
|
||||||
xhr[name] = function(type) {
|
|
||||||
|
|
||||||
var functors = sliceFunc.call(arguments,1),
|
|
||||||
list;
|
|
||||||
|
|
||||||
jQuery.each(type.split(/\s+/g), function() {
|
|
||||||
list = callbacksLists[this];
|
|
||||||
if ( list ) {
|
|
||||||
list[name].apply(list, functors );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
jQuery.each(callbacksLists, function(name) {
|
jQuery.each(callbacksLists, function(name) {
|
||||||
var list;
|
var list;
|
||||||
xhr[name] = function() {
|
xhr[name] = function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user