Difference between revisions of "JQuery Deferred object"
From Wiki @ Karl Jones dot com
Karl Jones (Talk | contribs) (Created page with "In jQuery, a '''Deferred object''' is a chainable utility object created by calling the '''jQuery.Deferred()''' method. It can register multiple callbacks into callback q...") |
Karl Jones (Talk | contribs) (→External links) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | In [[jQuery]], a '''Deferred object''' is a chainable utility object created by calling the '''jQuery.Deferred()''' method. | + | {{lowercase}}In [[jQuery]], a '''Deferred object''' is a chainable utility object created by calling the '''jQuery.Deferred()''' method. |
It can register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function. | It can register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function. | ||
Line 11: | Line 11: | ||
* [[Futures and promises]] | * [[Futures and promises]] | ||
* [[jQuery]] | * [[jQuery]] | ||
+ | * [[jQuery promise method]] | ||
== External links == | == External links == | ||
* [https://en.wikipedia.org/wiki/Futures_and_promises Futures and promises] @ Wikipedia.org | * [https://en.wikipedia.org/wiki/Futures_and_promises Futures and promises] @ Wikipedia.org | ||
+ | * [http://www.bitstorm.org/weblog/2012-1/Deferred_and_promise_in_jQuery.html Deferred and promise in jQuery] by Edwin Martin | ||
Latest revision as of 13:53, 16 September 2016
In jQuery, a Deferred object is a chainable utility object created by calling the jQuery.Deferred() method.
It can register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function.
The Deferred object is chainable, similar to the way a jQuery object is chainable, but it has its own methods. After creating a Deferred object, you can use any of the methods below by either chaining directly from the object creation or saving the object in a variable and invoking one or more methods on that variable.
The Deferred object was introduced in jQuery 1.5.
See also
External links
- Futures and promises @ Wikipedia.org
- Deferred and promise in jQuery by Edwin Martin