Initializes a new DjsDeferred object.
- Compability Note A - Ordering of callbacks through chained 'then' invocations
The Wiki entry at http://wiki.commonjs.org/wiki/Promises/A implies that .then() returns a distinct object. For compatibility with http://api.jquery.com/category/deferred-object/ we return this same object. This affects ordering, as the jQuery version will fire callbacks in registration order regardless of whether they occur on the result or the original object.
- Compability Note B - Fulfillment value
The Wiki entry at http://wiki.commonjs.org/wiki/Promises/A implies that the result of a success callback is the fulfillment value of the object and is received by other success callbacks that are chained. For compatibility with http://api.jquery.com/category/deferred-object/ we disregard this value instead.
Returns a version of this object that has only the read-only methods available.
Returns:An object with only the promise object.
Invokes error callbacks for this deferred object. All arguments are forwarded to error callbacks.
Invokes success callbacks for this deferred object. All arguments are forwarded to success callbacks.
Adds success and error callbacks for this deferred object. See Compatibility Note A.
Name Type Argument Description
Success callback ( may be null)
Error callback ( may be null)