control-freak-ide/Control-Freak-Documentation/jQuery/docs/entries/deferred.state.json
plastic-hub-dev-node-saturn 538369cff7 latest
2021-05-12 18:35:18 +02:00

1 line
1.5 KiB
JSON

{"name":"deferred.state","type":"method","title":"deferred.state()","deprecated":null,"removed":null,"desc":"Determine the current state of a Deferred object. ","categories":["deferred-object","version/1.7"],"entries":[{"return":"String","signatures":{"added":"1.7"},"examples":null,"longdesc":"\n <p>The deferred.state() method returns a string representing the current state of the Deferred object. The Deferred object can be in one of three states:</p>\n <ul>\n <li><strong>\"pending\"</strong>: The Deferred object is not yet in a completed state (neither \"rejected\" nor \"resolved\").</li>\n <li><strong>\"resolved\"</strong>: The Deferred object is in the resolved state, meaning that either <a href=\"/deferred.resolve/\"><code>deferred.resolve()</code></a> or <a href=\"/deferred.resolveWith/\"><code>deferred.resolveWith()</code></a> has been called for the object and the doneCallbacks have been called (or are in the process of being called). </li>\n <li><strong>\"rejected\"</strong>: The Deferred object is in the rejected state, meaning that either <a href=\"/deferred.reject/\"><code>deferred.reject()</code></a> or <a href=\"/deferred.rejectWith/\"><code>deferred.rejectWith()</code></a> has been called for the object and the failCallbacks have been called (or are in the process of being called).</li>\n </ul>\n <p>This method is primarily useful for debugging to determine, for example, whether a Deferred has already been resolved even though you are inside code that intended to reject it.</p>\n "}]}