forked from jquery/api.jquery.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeferred.notifyWith.xml
24 lines (24 loc) · 1.54 KB
/
deferred.notifyWith.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?xml version="1.0"?>
<entry name="deferred.notifyWith" type="method" return="Deferred">
<title>deferred.notifyWith()</title>
<signature>
<added>1.7</added>
<argument name="context" type="Object">
<desc>
Context passed to the progressCallbacks as the <code>this</code> object.
</desc>
</argument>
<argument name="args" type="Array" optional="true">
<desc>
An optional array of arguments that are passed to the progressCallbacks.
</desc>
</argument>
</signature>
<desc> Call the progressCallbacks on a Deferred object with the given context and <code>args</code>. </desc>
<longdesc>
<p>Normally, only the creator of a Deferred should call this method; you can prevent other code from changing the Deferred's state or reporting status by returning a restricted Promise object through deferred.promise().</p>
<p>When <code>deferred.notifyWith</code> is called, any progressCallbacks added by <a href="/deferred.then/"><code>deferred.then</code></a> or <a href="/deferred.progress/"><code>deferred.progress</code></a> are called. Callbacks are executed in the order they were added. Each callback is passed the <code>args</code> from the <code>.notifyWith()</code>. Any calls to <code>.notifyWith()</code> after a Deferred is resolved or rejected (or any progressCallbacks added after that) are ignored. For more information, see the documentation for <a href="/category/deferred-object/">Deferred object</a>.</p>
</longdesc>
<category slug="deferred-object"/>
<category slug="version/1.7"/>
</entry>