Delayed object-deferred.resolveWith(context,[args])

Delayed object-deferred.resolveWith(context,[args]), someone asked me to explain?


Resolve deferred objects and call any completed callback functions based on the given context and parameters.

When deferral is resolved, any deferred.then or deferred.fail added by doneCallbacks is called. Callbacks are executed in the order they were added. The args passed by each callback are called in deferred.reject(). After adding any failCallbacks deferred to the denied state, the addition is performed immediately, and the parameters used are passed to the .reject() call. See the file Deferred object for details .



The context is passed to doneCallbacks as the this object.

args v1.5

Optional parameters passed to doneCallbacks

Post your comments / questions