Skip to content

Commit 0c7e90b

Browse files
AurelioDeRosagnarf
authored andcommitted
jQuery.when: Update to "Promise-Compatible"
Based on jquerygh-567 the returned value of $.ajax() is actually a Promise-compatible object and not a Promise object. Closes jquerygh-574 Ref jquerygh-567
1 parent d443d96 commit 0c7e90b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

entries/jQuery.when.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</signature>
1010
<desc>Provides a way to execute callback functions based on one or more objects, usually <a href="/category/deferred-object/">Deferred</a> objects that represent asynchronous events.</desc>
1111
<longdesc>
12-
<p>If a single Deferred is passed to <code>jQuery.when()</code>, its Promise object (a subset of the Deferred methods) is returned by the method. Additional methods of the Promise object can be called to attach callbacks, such as <a href="/deferred.then/"><code>deferred.then</code></a>. When the Deferred is resolved or rejected, usually by the code that created the Deferred originally, the appropriate callbacks will be called. For example, the jqXHR object returned by <code>jQuery.ajax()</code> is a Promise and can be used this way:</p>
12+
<p>If a single Deferred is passed to <code>jQuery.when()</code>, its Promise object (a subset of the Deferred methods) is returned by the method. Additional methods of the Promise object can be called to attach callbacks, such as <a href="/deferred.then/"><code>deferred.then</code></a>. When the Deferred is resolved or rejected, usually by the code that created the Deferred originally, the appropriate callbacks will be called. For example, the jqXHR object returned by <code>jQuery.ajax()</code> is a Promise-compatible object and can be used this way:</p>
1313
<pre><code>
1414
$.when( $.ajax( "test.aspx" ) ).then(function( data, textStatus, jqXHR ) {
1515
alert( jqXHR.status ); // Alerts 200

0 commit comments

Comments
 (0)