diff --git a/entries/jQuery.when.xml b/entries/jQuery.when.xml index 371de6ee..e559e221 100644 --- a/entries/jQuery.when.xml +++ b/entries/jQuery.when.xml @@ -13,7 +13,7 @@
$.when( $.ajax("test.aspx") ).then(function(ajaxArgs){
      alert(ajaxArgs[1]); /* ajaxArgs is [ "success", statusText, jqXHR ] */
 });
-

If a single argument is passed to jQuery.when and it is not a Deferred, it will be treated as a resolved Deferred and any doneCallbacks attached will be executed immediately. The doneCallbacks are passed the original argument. In this case any failCallbacks you might set are never called since the Deferred is never rejected. For example:

+

If a single argument is passed to jQuery.when and it is not a Deferred or a Promise, it will be treated as a resolved Deferred and any doneCallbacks attached will be executed immediately. The doneCallbacks are passed the original argument. In this case any failCallbacks you might set are never called since the Deferred is never rejected. For example:

$.when( { testing: 123 } ).done(
     function(x){ alert(x.testing); } /* alerts "123" */
     );