Intent to Prototype: Range API improvements for rendered text content

86 views
Skip to first unread message

Daniel Libby

unread,
Mar 23, 2022, 8:21:05 PMMar 23
to blink-dev
Contact emails
dli...@microsoft.com

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

Specification
N/A

Summary
Expose a flat text representation of the rendered text of Range objects and allow developers to move a Range's DOM position endpoints over that representation.

Blink component
Blink>DOM

Motivation
Ranges are somewhat limited in capabilities for advanced editing scenarios. While Ranges expose information about the rendering of the contained text via client rect(s), they only expose the text content (not the visible text — see differences) of the Range to script via toString(). Without this information, web developers resort to heuristics in JavaScript to map offsets of the visible text back to Node offsets in the DOM, which can be computationally expensive and error prone.

Initial public proposal
https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/RangeInnerText/explainer.md

Search tags
RangeinnerText

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

TAG review status
Pending

Risks

        Interoperability and Compatibility

        Gecko: No signal

        WebKit: No signal

        Web developers: No signals.
        No direct signals on this specific proposal to date, but here are some links to discussion on the web on this class of issues:
        http://perfectionkills.com/the-poor-misunderstood-innerText/#case-for-innerText
        https://github.com/timdown/rangy/wiki/Text-Range-Module

Debuggability
No specific additional debuggability needed

Is this feature fully tested by web-platform-tests?
Not yet

Flag name
N/A

Requires code in //chrome?
False

Tracking bug
https://bugs.chromium.org/p/chromium/issues/detail?id=1309193

Estimated milestones
No milestones specified

Link to entry on the Chrome Platform Status https://chromestatus.com/feature/5153662547525632


This intent message was generated by Chrome Platform Status.

Reply all
Reply to author
Forward
0 new messages