tadam logo
Did you find an error in the text?
Select this with mouse and press
Ctrl + Enter
Xhtml.co.il Check Spelling
Orphus system

deferred.resolveWith()

deferred.resolveWith( context, args )

Returns: Deferred
Description: Resolve a Deferred object and call any doneCallbacks with the given context and args.

Arguments

deferred.resolveWith( context, args )

version added: 1.5
context
Context passed to the doneCallbacks as the this object.
args
Optional arguments that are passed to the doneCallbacks .

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 .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 .resolve() call. For more information, see the documentation for Deferred object.

Was this information helpful?
   

Comments