- fail: failDeferred.then,
- fireReject: failDeferred.fire,
- reject: failDeferred.resolve,
- isRejected: failDeferred.isResolved,
- // Get a promise for this deferred
- // If obj is provided, the promise aspect is added to the object
- promise: function( obj ) {
- obj = obj || {};
- jQuery.each( "then fail isResolved isRejected".split( " " ) , function( _ , method ) {
- obj[ method ] = deferred[ method ];
- });
- obj.promise = function() {
- return obj;
- };
+ then: function( completeCallbacks , failCallbacks ) {
+ deferred.complete( completeCallbacks ).fail( failCallbacks );
+ return this;
+ },
+ fail: failDeferred.complete,
+ fireReject: failDeferred.fire,
+ reject: failDeferred.resolve,
+ isRejected: failDeferred.isResolved,
+ // Get a promise for this deferred
+ // If obj is provided, the promise aspect is added to the object
+ promise: function( obj ) {
+ obj = obj || {};
+ jQuery.each( "then complete fail isResolved isRejected".split( " " ) , function( _ , method ) {
+ obj[ method ] = deferred[ method ];
+ });
+ obj.promise = function() {