api.jquery.com icon indicating copy to clipboard operation
api.jquery.com copied to clipboard

Qualify or remove $.fn.text caveat

Open jugglinmike opened this issue 8 years ago • 2 comments

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.

jugglinmike avatar Jul 29 '17 18:07 jugglinmike

Reasonable. I'll take a look at this tomorrow.

AurelioDeRosa avatar Jan 03 '18 03:01 AurelioDeRosa

@AurelioDeRosa this has some bearing on an issue filed against the Cheerio project. Would you mind taking a look?

jugglinmike avatar Oct 20 '18 23:10 jugglinmike