diff options
author | Oleg Gaidarenko <markelog@gmail.com> | 2015-02-15 05:41:38 +0300 |
---|---|---|
committer | Oleg Gaidarenko <markelog@gmail.com> | 2015-02-17 09:58:45 +0300 |
commit | 9d1b989f20b550af3590691723b0620f6914626e (patch) | |
tree | f4ff6c74d74a81c1ce17c32cf0efb8f2b41a9ef4 /src/ajax.js | |
parent | 8b6aeae52d4c53a53468678ccd45e9dda9665004 (diff) | |
download | jquery-9d1b989f20b550af3590691723b0620f6914626e.tar.gz jquery-9d1b989f20b550af3590691723b0620f6914626e.zip |
Ajax: remove deprecated extensions from ajax promise
Fixes gh-2084
Closes gh-2092
Diffstat (limited to 'src/ajax.js')
-rw-r--r-- | src/ajax.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/ajax.js b/src/ajax.js index a9faee78d..70bb49691 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -487,9 +487,7 @@ jQuery.extend({ }; // Attach deferreds - deferred.promise( jqXHR ).complete = completeDeferred.add; - jqXHR.success = jqXHR.done; - jqXHR.error = jqXHR.fail; + deferred.promise( jqXHR ); // Remove hash character (#7531: and string promotion) // Add protocol if not provided (prefilters might expect it) @@ -619,9 +617,9 @@ jQuery.extend({ strAbort = "abort"; // Install callbacks on deferreds - for ( i in { success: 1, error: 1, complete: 1 } ) { - jqXHR[ i ]( s[ i ] ); - } + completeDeferred.add( s.complete ); + jqXHR.done( s.success ); + jqXHR.fail( s.error ); // Get transport transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); |