#11745 closed bug (invalid)
resolve, reject and notify are missing in jqXHR-object
Reported by: | 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.
Change History (3)
comment:1 Changed 11 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 Changed 11 years ago by
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.