-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(text selector): match text in child nodes (#5293)
This changes `text=` and `:text()` selectors to match the element when: - it's combined text content matches the text; - combined text content of any immediate child does not match the text. This allows the following markup to match "Some bold and italics text": `<div>Some <b>bold</b> and <i>italics</i> text</div>`. For the reference, "combined text content" is almost equal to `element.textContent`, but with some changes like using value of `<input type=button>` or ignoring `<head>`. This also includes some caching optimizations, meaningful in complex matches that involve multiple calls to the text engine. Performance changes (measured on large page with ~25000 elements): - `:has-text()` - 14% faster. - `text=` - 50% faster. - `:text()` - 0-35% slower. - `:text-matches()` - 28% slower.
- v1.50.1
- v1.50.0
- v1.49.1
- v1.49.0
- v1.48.2
- v1.48.1
- v1.48.0
- v1.47.2
- v1.47.1
- v1.47.0
- v1.46.1
- v1.46.0
- v1.45.3
- v1.45.2
- v1.45.1
- v1.45.0
- v1.44.1
- v1.44.0
- v1.43.1
- v1.43.0
- v1.42.1
- v1.42.0
- v1.41.2
- v1.41.1
- v1.41.0
- v1.40.1
- v1.40.0
- v1.39.0
- v1.38.1
- v1.38.0
- v1.37.1
- v1.37.0
- v1.36.2
- v1.36.1
- v1.36.0
- v1.35.1
- v1.35.0
- v1.34.3
- v1.34.2
- v1.34.1
- v1.34.0
- v1.33.0
- v1.32.3
- v1.32.2
- v1.32.1
- v1.32.0
- v1.31.2
- v1.31.1
- v1.31.0
- v1.30.0
- v1.29.2
- v1.29.1
- v1.29.0
- v1.28.1
- v1.28.0
- v1.27.1
- v1.27.0
- v1.26.1
- v1.26.0
- v1.25.2
- v1.25.1
- v1.25.0
- v1.24.2
- v1.24.1
- v1.24.0
- v1.23.4
- v1.23.3
- v1.23.2
- v1.23.1
- v1.23.0
- v1.22.2
- v1.22.1
- v1.22.0
- v1.21.1
- v1.21.0
- v1.20.2
- v1.20.1
- v1.20.0
- v1.19.2
- v1.19.1
- v1.19.0
- v1.18.1
- v1.18.0
- v1.18.0-rc1
- v1.17.2
- v1.17.1
- v1.17.0
- v1.17.0-rc1
- v1.16.3
- v1.16.2
- v1.16.1
- v1.16.0
- v1.15.2
- v1.15.1
- v1.15.0
- v1.14.1
- v1.14.0
- v1.13.1
- v1.13.0
- v1.12.3
- v1.12.2
- v1.12.1
- v1.12.0
- v1.11.1
- v1.11.0
- v1.10.0
- v1.9.2
- v1.9.1
- v1.9.0
Showing
4 changed files
with
196 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.