Skip to content

Commit 6f9d749

Browse files
committed
deferred.then returns Promise, not Deferred, object.
1 parent 29d5696 commit 6f9d749

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

entries/deferred.then.xml

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<entry name="deferred.then" type="method" return="Deferred">
2+
<entry name="deferred.then" type="method" return="Promise">
33
<title>deferred.then()</title>
44
<signature>
55
<added>1.5</added>
@@ -36,7 +36,11 @@
3636
<longdesc>
3737
<p>All three arguments (including progressCallbacks, as of jQuery 1.7) can be either a single function or an array of functions. The arguments can also be <code>null</code> if no callback of that type is desired. Alternatively, use <code>.done()</code>, <code>.fail()</code> or <code>.progress()</code> to set only one type of callback. </p>
3838
<p>When the Deferred is resolved, the doneCallbacks are called. If the Deferred is instead rejected, the failCallbacks are called. As of jQuery 1.7, the <code>deferred.notify()</code> or <code>deferred.notifyWith()</code> methods can be called to invoke the progressCallbacks as many times as desired before the Deferred is resolved or rejected.</p>
39-
<p>Callbacks are executed in the order they were added. Since <code>deferred.then</code> returns the deferred object, other methods of the deferred object can be chained to this one, including additional <code>.then()</code> methods. For more information, see the documentation for <a href="http://api.jquery.com/category/deferred-object/">Deferred object</a>.</p>
39+
<p>Callbacks are executed in the order they were added. Since
40+
<code>deferred.then</code> returns a Promise, other methods of the
41+
Promise object can be chained to this one, including additional
42+
<code>.then()</code> methods.
43+
</p>
4044
</longdesc>
4145
<example>
4246
<desc>Since the <a href="/jQuery.get"><code>jQuery.get</code></a> method returns a jqXHR object, which is derived from a Deferred object, we can attach handlers using the <code>.then</code> method.</desc>
@@ -50,4 +54,4 @@ $.get("test.php").then(
5054
<category slug="deferred-object"/>
5155
<category slug="version/1.5"/>
5256
<category slug="version/1.7"/>
53-
</entry>
57+
</entry>

0 commit comments

Comments
 (0)