jquery / jquery/api.jquery.com

undocumented jqXHR.promise()

Open
#1,094 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
325
Forks
260
PR merge metrics
No merged PRs in 30d

Description

I see that the object returned by $.ajax() contains a promise() function. However, looking at the documentation of jqXHR I cannot find this function being mentioned anywhere:

Also the function does not exist in XMLHttpRequest (for which jqXHR is a superset)

Deferred has a promise() function, but I can see that jqXHR is not a Deferred, since it does not have a resolve()/reject()

Should't the function be referenced in the jqXHR documentation?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the jqXHR sections of the linked jQuery.ajax and Types documentation, then compare the Deferred documentation to confirm the promise() relationship. Document jqXHR.promise() in the appropriate jqXHR reference, making the distinction from XMLHttpRequest and Deferred clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
jquery
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.