[whatwg/dom] OpaqueRange: cross-post from whatwg/html#11478 for DOM community input (Issue #1468)

stephanieyzhang created an issue (whatwg/dom#1468)

### What is the issue with the DOM Standard?

Cross-posting from https://github.com/whatwg/html/issues/11478 to get DOM community input on `OpaqueRange`, a proposed new `AbstractRange` subclass for encapsulated content.

`OpaqueRange` represents a live span of content within a host element, so developers can work with that content using range-like APIs. For `<textarea>` and text-based `<input>`, that content is the element's value text. The design also has a path to custom elements, so authors can expose encapsulated ranges over their own internal content in the future.

It enables operations such as `getBoundingClientRect()`, `getClientRects()`, and integration with the CSS Custom Highlight API for UI such as inline suggestions, highlights, and anchored popovers. It preserves encapsulation by exposing only offsets while not exposing the underlying nodes, so the host element's internal structure stays hidden.

Relevant links:
- Explainer: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/OpaqueRange/explainer.md
- WHATWG Discussion Thread: https://github.com/whatwg/html/issues/11478
- DOM Spec PR: https://github.com/whatwg/dom/pull/1404
- HTML Spec PR: https://github.com/whatwg/html/pull/11741

Posting here so DOM reviewers can weigh in. **Please keep discussion to https://github.com/whatwg/html/issues/11478. This issue is mainly a pointer for visibility.**

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/1468
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/issues/1468@github.com>

Received on Thursday, 28 May 2026 15:33:05 UTC