dojo.Deferred (version 1.3)

Encapsulates a sequence of callbacks in response to a value that may not yet be available. This is modeled after the Deferred class from Twisted <http://twistedmatrix.com>.

Property Summary

Method Summary

Properties

_nextId
Defined by
canceller
Defined by
chain
Defined by
fired
Defined by
id
Defined by
paused
Defined by
results
Defined by
silentlyCancelled
Defined by

Methods

_check()
Defined by
_fire()
Defined by
Used internally to exhaust the callback sequence when a result is available.
_resback(res)
Defined by
The private primitive that means either callback or errback
ParameterTypeDescription
res
addBoth(cb, cbfn)
Defined by
Add the same function as both a callback and an errback as the next element on the callback sequence.This is useful for code that you want to guarantee to run, e.g. a finalizer.
ParameterTypeDescription
cbFunction | Object
cbfnString
Optional.
Returns: dojo.Deferred
addCallback(cb, cbfn)
Defined by
Add a single callback to the end of the callback sequence.
ParameterTypeDescription
cbFunction | Object
cbfnString? ..
Optional.
Returns: dojo.Deferred
addCallbacks(cb, eb)
Defined by
Add separate callback and errback to the end of the callback sequence.
ParameterTypeDescription
cb
eb
Returns: dojo.Deferred
addErrback(cb, cbfn)
Defined by
Add a single callback to the end of the callback sequence.
ParameterTypeDescription
cb
cbfn
Returns: dojo.Deferred
callback(res)
Defined by
Begin the callback sequence with a non-error value.
ParameterTypeDescription
res
cancel()
Defined by
Cancels a Deferred that has not yet received a value, or is waiting on another Deferred as its value.
errback(res)
Defined by
Begin the callback sequence with an error result.
ParameterTypeDescription
resError