Checks whether a given tag and its attributes match the search criteria.
Source
*
* This _should_ work everywhere, but there are some extreme exceptions.
*
* - Comments.
* - Tagged templates, such as `String.raw()`, which provide access to “raw” strings.
* - The `source` property of a RegExp object.
*
* Each of these exceptions appear at the source code level, not at the semantic or
* evaluation level. Normal JavaScript will remain semantically equivalent after escaping,
* but any JavaScript which analyzes the raw source code will see potentially-different
* values.
*
* #### Comments
*
* Comments are never unescaped because they aren’t parsed by the JavaScript engine.
* When viewing the source in a browser’s developer tools, the comments will retain
* their escaped text.
*
* Example:
*
* // A comment: "</script>"
* …becomes…
Changelog
| Version | Description |
|---|---|
| 6.2.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.