aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax.js
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2011-09-12 17:37:41 +0200
committertimmywil <timmywillisn@gmail.com>2011-09-19 15:42:30 -0400
commit4092e3d2754e3847cd3159edb23184d4cfd4cf03 (patch)
tree79a0a58644939da906ec750281488beee862a41d /src/ajax.js
parent1878885fb7a09b65d95980a9b7dce2df2944e4f9 (diff)
downloadjquery-4092e3d2754e3847cd3159edb23184d4cfd4cf03.tar.gz
jquery-4092e3d2754e3847cd3159edb23184d4cfd4cf03.zip
$.Callbacks, $.Topic and notify/progress on $.Deferred.
Diffstat (limited to 'src/ajax.js')
-rw-r--r--src/ajax.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ajax.js b/src/ajax.js
index 623e9fe71..47aaf192f 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -43,7 +43,7 @@ var r20 = /%20/g,
// Document location segments
ajaxLocParts,
-
+
// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
allTypes = ["*/"] + ["*"];
@@ -403,7 +403,7 @@ jQuery.extend({
jQuery( callbackContext ) : jQuery.event,
// Deferreds
deferred = jQuery.Deferred(),
- completeDeferred = jQuery._Deferred(),
+ completeDeferred = jQuery.Callbacks( "once memory" ),
// Status-dependent callbacks
statusCode = s.statusCode || {},
// ifModified key
@@ -582,7 +582,7 @@ jQuery.extend({
}
// Complete
- completeDeferred.resolveWith( callbackContext, [ jqXHR, statusText ] );
+ completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
if ( fireGlobals ) {
globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
@@ -597,7 +597,7 @@ jQuery.extend({
deferred.promise( jqXHR );
jqXHR.success = jqXHR.done;
jqXHR.error = jqXHR.fail;
- jqXHR.complete = completeDeferred.done;
+ jqXHR.complete = completeDeferred.add;
// Status-dependent callbacks
jqXHR.statusCode = function( map ) {