Revert "Ajax: remove deprecated extensions from ajax promise"

This reverts commit 9368a8cd8c.
This commit is contained in:
Oleg Gaidarenko 2015-12-22 17:14:52 +03:00
parent 5826cafb95
commit c999b6613e

View File

@ -515,7 +515,9 @@ jQuery.extend( {
};
// 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)
// Add protocol if not provided (prefilters might expect it)
@ -648,9 +650,9 @@ jQuery.extend( {
strAbort = "abort";
// Install callbacks on deferreds
completeDeferred.add( s.complete );
jqXHR.done( s.success );
jqXHR.fail( s.error );
for ( i in { success: 1, error: 1, complete: 1 } ) {
jqXHR[ i ]( s[ i ] );
}
// Get transport
transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );