Skip to content

[css-highlight-api-1] Integrate OpaqueRange into Highlight and highlightsFromPoint#13929

Open
stephanieyzhang wants to merge 2 commits into
w3c:mainfrom
stephanieyzhang:stzhang/opaquerange-highlights
Open

[css-highlight-api-1] Integrate OpaqueRange into Highlight and highlightsFromPoint#13929
stephanieyzhang wants to merge 2 commits into
w3c:mainfrom
stephanieyzhang:stzhang/opaquerange-highlights

Conversation

@stephanieyzhang

@stephanieyzhang stephanieyzhang commented May 15, 2026

Copy link
Copy Markdown

Wires OpaqueRange into the Custom Highlight API so highlights can cover the value text of <input> and <textarea>.

  • Highlight accepts OpaqueRange alongside Range and StaticRange.
  • Defines when an OpaqueRange triggers repaints and when they're ignored.
  • highlightsFromPoint() returns OpaqueRange hits inside <input> and <textarea> value text.
  • Adds an example covering OpaqueRange in the main document and inside a shadow tree.

Chromium implementation:

Additional Links

Comment thread css-highlight-api-1/Overview.bs Outdated
@stephanieyzhang

Copy link
Copy Markdown
Author

cc @ffiori and @dandclark for review -- couldn't add you directly as reviewers.

@ffiori

ffiori commented May 18, 2026

Copy link
Copy Markdown
Member

Should we wait to merge this PR until the definition of OpaqueRange is present in https://dom.spec.whatwg.org/?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants