What is the issue with the DOM Standard?
Cross-posting from whatwg/html#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:
Posting here so DOM reviewers can weigh in. Please keep discussion to whatwg/html#11478. This issue is mainly a pointer for visibility.
What is the issue with the DOM Standard?
Cross-posting from whatwg/html#11478 to get DOM community input on
OpaqueRange, a proposed newAbstractRangesubclass for encapsulated content.OpaqueRangerepresents 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:
Posting here so DOM reviewers can weigh in. Please keep discussion to whatwg/html#11478. This issue is mainly a pointer for visibility.