jquery / jquery/api.jquery.com

Qualify or remove $.fn.text caveat

Open
#1,055 2 comments 1 reaction 1 assignee View on GitHub

@AurelioDeRosa is already working on this.

Since Jan 3, 2018.

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

Description

The docs for $.fn.text contain the following recommendation:

The .text() method cannot be used on form inputs or scripts. [...] To get
the value of a script element, use the .html() method.

As far as I am aware, this is only relevant for Internet Explorer versions 8
and below (all other browsers include the text content of script elements).
Because jQuery no longer supports those browsers, I'm wondering if the text
should be removed or perhaps updated to qualify for users of jQuery 1.x.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.