jquery / jquery/api.jquery.com

$.getScript is missing a signature

Open
#1,052 4 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

jQuery 1.12.0 added a signature for passing an options object to $.getScript.
The options are padded on to $.ajax.

  1. The signature should be added to the docs
  2. In the Examples section, if you want to enable browser caching it is recommended to add a new function. This is not a good practice, and since 1.12.0 there is no use for it. One can simply:
    $.getScript({
        url: "foo.js",
        cache: true
    })

The above example should be added to the examples section, for jQuery 1.12.0 or later.

https://api.jquery.com/jquery.getscript/

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

Open the linked jquery.getscript API documentation page and review its signature and Examples section. Update the documentation to cover the options-object signature and the jQuery 1.12.0 caching example; the page should clearly show both the supported signature and the recommended usage when done.

Written by the indexing model from the issue text.

Assessment

Tech stack
jquery
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.