diff --git a/entries/jQuery.when.xml b/entries/jQuery.when.xml index 09c8393e..a27f2adc 100644 --- a/entries/jQuery.when.xml +++ b/entries/jQuery.when.xml @@ -3,11 +3,14 @@
If no arguments are passed to jQuery.when()
, it will return a resolved Promise.
If a single Deferred is passed to jQuery.when()
, 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 deferred.then
. 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 jQuery.ajax()
is a Promise-compatible object and can be used this way:
As of jQuery 1.5, the $.ajax() method returns the jqXHR object, which is a superset of the XMLHTTPRequest object. For more information, see the jqXHR section of the $.ajax entry
+Any object that has a then
method.
As of jQuery 1.5, the Deferred object provides a way to register multiple callbacks into self-managed callback queues, invoke callback queues as appropriate, and relay the success or failure state of any synchronous or asynchronous function.