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

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


Reject the deferred object and call any failed callback function based on the given context and parameters. .

When the delay is denied, 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 the failCallbacks as the this object.

args v1.5

Optional argument passed to failCallbacks.

Post your comments / questions