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 9d1b989f20
.
This commit is contained in:
parent
c69673fe41
commit
8a0176279f
10
src/ajax.js
10
src/ajax.js
@ -513,7 +513,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)
|
||||
@ -646,9 +648,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 );
|
||||
|
9
src/effects.js
vendored
9
src/effects.js
vendored
@ -3,6 +3,7 @@ define( [
|
||||
"./var/document",
|
||||
"./var/rcssNum",
|
||||
"./css/var/cssExpand",
|
||||
"./var/rnotwhite",
|
||||
"./css/var/isHidden",
|
||||
"./css/adjustCSS",
|
||||
"./css/defaultDisplay",
|
||||
@ -14,7 +15,7 @@ define( [
|
||||
"./css",
|
||||
"./deferred",
|
||||
"./traversing"
|
||||
], function( jQuery, document, rcssNum, cssExpand,
|
||||
], function( jQuery, document, rcssNum, cssExpand, rnotwhite,
|
||||
isHidden, adjustCSS, defaultDisplay, dataPriv ) {
|
||||
|
||||
var
|
||||
@ -331,6 +332,10 @@ function Animation( elem, properties, options ) {
|
||||
for ( ; index < length ; index++ ) {
|
||||
result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
|
||||
if ( result ) {
|
||||
if ( jQuery.isFunction( result.stop ) ) {
|
||||
jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
|
||||
jQuery.proxy( result.stop, result );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -370,7 +375,7 @@ jQuery.Animation = jQuery.extend( Animation, {
|
||||
callback = props;
|
||||
props = [ "*" ];
|
||||
} else {
|
||||
props = props.split( " " );
|
||||
props = props.match( rnotwhite );
|
||||
}
|
||||
|
||||
var prop,
|
||||
|
Loading…
Reference in New Issue
Block a user