JQuery

Delayed object-deferred.isRejected()

Delayed object-deferred.isRejected(), someone asked me to explain?

overview

Determine if the lingering object has been rejected.

Note: Deprecated in jquery1.7API, please use deferred.state() instead.

Returns true if the lingering object is in the rejected state, which means that either the deferred.reject() or deferred.rejectWith() is called and the failCallbacks are accessed (or in the process).

Note that a deferred object can have three states: unresolved, resolved, or rejected; use deferred.isResolved() to determine if the lingering object is in a resolved state. These methods are mainly useful for debugging purposes, for example, to determine if deferral has been resolved, even if you intend to reject it in your code.

Post your comments / questions