mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Revert "Ajax: remove deprecated extensions from ajax promise"
This reverts commit 9368a8cd8c
.
This commit is contained in:
parent
5826cafb95
commit
c999b6613e
10
src/ajax.js
10
src/ajax.js
@ -515,7 +515,9 @@ jQuery.extend( {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Attach deferreds
|
// Attach deferreds
|
||||||
deferred.promise( jqXHR );
|
deferred.promise( jqXHR ).complete = completeDeferred.add;
|
||||||
|
jqXHR.success = jqXHR.done;
|
||||||
|
jqXHR.error = jqXHR.fail;
|
||||||
|
|
||||||
// Remove hash character (#7531: and string promotion)
|
// Remove hash character (#7531: and string promotion)
|
||||||
// Add protocol if not provided (prefilters might expect it)
|
// Add protocol if not provided (prefilters might expect it)
|
||||||
@ -648,9 +650,9 @@ jQuery.extend( {
|
|||||||
strAbort = "abort";
|
strAbort = "abort";
|
||||||
|
|
||||||
// Install callbacks on deferreds
|
// Install callbacks on deferreds
|
||||||
completeDeferred.add( s.complete );
|
for ( i in { success: 1, error: 1, complete: 1 } ) {
|
||||||
jqXHR.done( s.success );
|
jqXHR[ i ]( s[ i ] );
|
||||||
jqXHR.fail( s.error );
|
}
|
||||||
|
|
||||||
// Get transport
|
// Get transport
|
||||||
transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
|
transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
|
||||||
|
Loading…
Reference in New Issue
Block a user