dom icon indicating copy to clipboard operation
dom copied to clipboard

Add definition for composed selection range

Open dizhang168 opened this issue 10 months ago • 9 comments
trafficstars

As discussed at TPAC 2024, the specification for the new getComposedRanges() API need the introduction of the new definition "Composed live range" [1], which should react to mutations. This PR attempts to define that new concept. Once landed, we will add the spec language that uses composed live range in the Selection API. An overview of the spec changes necessary can be found at [2].

[1] https://github.com/w3c/selection-api/issues/2#issuecomment-2427784793 [2] https://github.com/dizhang168/shadow-dom-selection/blob/main/selection-api-spec-changes.md

01/28/2025 Edit: Changed naming to Composed Selection Range.

  • [x] At least two implementers are interested (and none opposed):
    • Chromium: Positive
    • Webkit: Positive (https://github.com/mozilla/standards-positions/issues/1055)
    • Gecko: Positive (https://github.com/WebKit/standards-positions/issues/376)
  • [x] Tests are written and can be reviewed and commented upon at:
    • This PR introduces an internal concept as a Composed Live Range is not exposed directly to the user
    • getComposedRanges() function tests can be found at: https://wpt.fyi/results/selection/shadow-dom/tentative?label=experimental&label=master&aligned
  • [x] Implementation bugs are filed:
    • Chromium: https://issues.chromium.org/issues/40286116
    • Gecko: https://bugzilla.mozilla.org/show_bug.cgi?id=1430308
    • WebKit: https://bugs.webkit.org/show_bug.cgi?id=216325
  • [x] MDN issue is filed:
    • Not necessary since live range and composed selection range are all definitions/concepts and not web exposed.
  • [x] The top of this comment includes a clear commit message to use.

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

dizhang168 avatar Dec 17 '24 23:12 dizhang168