deferred.state()Returns: String
Description: Determine the current state of a Deferred object.
-
version added: 1.7deferred.state()
- This method does not accept any arguments.
- "pending": The Deferred object is not yet in a completed state (neither "rejected" nor "resolved").
-
"resolved": The Deferred object is in the resolved state, meaning that either
deferred.resolve()
ordeferred.resolveWith()
has been called for the object and the doneCallbacks have been called (or are in the process of being called). -
"rejected": The Deferred object is in the rejected state, meaning that either
deferred.reject()
ordeferred.rejectWith()
has been called for the object and the failCallbacks have been called (or are in the process of being called).