Deferred objects
Deferred objects and their promises allow us to react to the completion of long-running tasks with a convenient syntax. They are discussed in detail in Chapter 11, Advanced Effects.
Object creation
Function |
Description |
---|---|
|
Returns a new deferred object. |
|
Returns a promise object to be resolved when the given deferred objects are resolved. |
Methods of deferred objects
Method |
Description |
---|---|
|
Sets the state of the object to resolved. |
|
Sets the state of the object to resolved while making the keyword |
|
Sets the state of the object to rejected. |
|
Get Learning jQuery - Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.