From 900c3ce12d4388b5a7f2b700d9a1895a3f267ef2 Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Thu, 26 Mar 2015 12:22:19 +0000 Subject: [PATCH] deferred.resolve(): Add note about promise Make consistent with other methods like: * `resolveWith` * `notify`, `notifyWith` * `reject`, `rejectWith` Closes gh-681 --- entries/deferred.resolve.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/entries/deferred.resolve.xml b/entries/deferred.resolve.xml index 8ed34680..3aea3599 100644 --- a/entries/deferred.resolve.xml +++ b/entries/deferred.resolve.xml @@ -11,6 +11,7 @@ Resolve a Deferred object and call any doneCallbacks with the given args. +

Normally, only the creator of a Deferred should call this method; you can prevent other code from changing the Deferred's state by returning a restricted Promise object through deferred.promise().

When the Deferred is resolved, any doneCallbacks added by deferred.then() or deferred.done() are called. Callbacks are executed in the order they were added. Each callback is passed the args from the deferred.resolve(). Any doneCallbacks added after the Deferred enters the resolved state are executed immediately when they are added, using the arguments that were passed to the deferred.resolve() call. For more information, see the documentation for jQuery.Deferred().