Contact emails
[email protected]<mailto:[email protected]>, 
[email protected]<mailto:[email protected]>, 
[email protected]<mailto:[email protected]>, 
[email protected]<mailto:[email protected]>

Explainer
https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/OpaqueRange/explainer.md

Specification
https://github.com/whatwg/dom/pull/1404

Summary
OpaqueRange represents a live span of text within a form control's value (for 
example, a <textarea> or text <input>), so developers can work with value text 
using range-like APIs. It enables operations like getBoundingClientRect(), 
getClientRects(), and use with the CSS Highlights API for UI such as inline 
suggestions, highlights, and anchored popovers. It preserves encapsulation by 
exposing only value offsets (and returning null for 
startContainer/endContainer), so DOM endpoints and internal structure aren't 
exposed.

Blink component
Blink>DOM<https://issues.chromium.org/issues?q=customfield1222907:%22Blink%3EDOM%22>

Web Feature ID
Missing feature
New feature ID for OpaqueRange * Issue #3863 * 
web-platform-dx/web-features<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fweb-platform-dx%2Fweb-features%2Fissues%2F3863&data=05%7C02%7Cstephanie.zhang%40microsoft.com%7C368ae7a2c0294ba588fa08de869f78e5%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C639096216666151397%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=TPOSBzyoxtjmySsertgJ9DDWsEl9UwLzIYDpZ3u7cYE%3D&reserved=0>

TAG review
https://github.com/w3ctag/design-reviews/issues/1206

TAG review status
Pending

Goals for experimentation
Validate API design and gather developer feedback on whether the API meets 
their needs.

Risks


Interoperability and Compatibility
OpaqueRange adds new methods (e.g., createValueRange()) to <textarea> and text 
<input> elements so authors can create ranges over value text. It doesn't 
change existing editing or selection behavior, so the risk to existing sites is 
low. The main interoperability risk is lack of implementation across engines, 
which could make text-anchored UI or highlights inside native controls work in 
only some browsers.

Gecko: No signal (https://github.com/mozilla/standards-positions/issues/1289)

WebKit: No signal (https://github.com/WebKit/standards-positions/issues/541)

Web developers: Positive (https://github.com/w3c/csswg-drafts/issues/10346) 
Another positive example: https://github.com/whatwg/html/issues/11478

Other signals:

Ergonomics
OpaqueRange is typically used with selection offsets and with 
geometry/highlighting APIs. The geometry calls are synchronous and can trigger 
layout, similar to existing Range geometry methods. Since the range is live, 
offsets are updated as the control's value is edited.

Activation
Moderate. Developers need to learn the value-offset model and how it differs 
from Range (there are no DOM endpoints).

Security
No new data exposure beyond existing access to form control values and 
selection. Exposes only value offsets and geometry and does not expose internal 
DOM (startContainer/endContainer are null).

WebView application risks
Does this intent deprecate or change behavior of existing APIs, such that it 
has potentially high risk for Android WebView-based applications?
Low. OpaqueRange adds a new method to <textarea> and text <input> elements, but 
does not change or deprecate any existing behavior


Ongoing technical constraints
None

Debuggability
No DevTools changes required.

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, 
ChromeOS, Android, and Android WebView)?
Yes
Works on all platforms that support <input> and <textarea> elements.

Is this feature fully tested by 
web-platform-tests<https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md>?
Yes
https://wpt.fyi/results/dom/ranges/tentative?label=experimental&label=master&aligned

Flag name on about://flags
N/A

Finch feature name
OpaqueRange

Requires code in //chrome?
False

Tracking bug
https://issues.chromium.org/issues/421421332

Measurement
UseCounter `OpaqueRange` measures successful creation of OpaqueRange objects on 
<textarea> and text <input> elements.

Estimated milestones
Origin trial desktop first      148
DevTrial on desktop     148
Origin trial Android first      148
DevTrial on Android     148


Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/6297362687066112?gate=5151419728134144

Links to previous Intent discussions
Intent to Prototype: 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/LV9PR21MB5189A114B34C8A3685A3C4A4805CA%40LV9PR21MB5189.namprd21.prod.outlook.com


This intent message was generated by Chrome Platform 
Status<https://chromestatus.com/>.


-- 
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/BL4PR00MB2613A0F3F751C7AB5AC89EC1EC4BA%40BL4PR00MB2613.namprd00.prod.outlook.com.

Reply via email to