Side navigation
#11745 closed bug (invalid)
Opened May 10, 2012 08:29AM UTC
Closed May 10, 2012 02:21PM UTC
Last modified July 06, 2012 10:18PM UTC
resolve, reject and notify are missing in jqXHR-object
Reported by: | albin@thefarm.se | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The resolve, reject, notify with their additional ''With'' methods are missing from the jqHRX-object returned by an ajax-call. This should either be mentioned in the documentation or added to the object.
Attachments (0)
Change History (3)
Changed May 10, 2012 02:21PM UTC by comment:1
resolution: | → invalid |
---|---|
status: | new → closed |
Changed May 10, 2012 02:35PM UTC by comment:2
Right. The docs for $.ajax
are massive, but the pony *is* in there:
The jqXHR objects returned by $.ajax() as of jQuery 1.5 implement the Promise interface, giving them all the properties, methods, and behavior of a Promise (see Deferred object for more information). -- http://api.jquery.com/jQuery.ajax/#jqXHR
Promise: This object provides a subset of the methods of the Deferred object (then, done, fail, always, pipe. isResolved, and isRejected) to prevent users from changing the state of the Deferred. -- http://api.jquery.com/Types/#jqXHR
Each jqXHR implements Promise, but not Deferred. You don't get to manually
resolve
/reject
/notify
them.