Hi all, In bug 1867058 <https://bugzilla.mozilla.org/show_bug.cgi?id=1867058>, I plan to land some patches that implement the Selection.getComposedRanges() and the Selection.direction APIs, as specified in https://www.w3.org/TR/selection-api/. Selection.direction exposes the direction of the selection, and Selection.getComposedRanges() allows web authors to get selection endpoints across the shadow boundaries.
In addition to these two new APIs, I'll also land some patches that allow users to visually select page contents that cross the ShadowDOM boundary. There are follow-up works that are needed before we can ship this feature. bug 1881095 <https://bugzilla.mozilla.org/show_bug.cgi?id=1881095> will ensure the copy-paste feature for ShadowDOM selection works, bug 1881096 <https://bugzilla.mozilla.org/show_bug.cgi?id=1881096> will ensure printing ShadowDOM selection works and bug 1867059 <https://bugzilla.mozilla.org/show_bug.cgi?id=1867059> will ensure we have a sensible solution for slotted contents. *Bug*: https://bugzilla.mozilla.org/show_bug.cgi?id=1867058 *Specification*: https://www.w3.org/TR/selection-api/ *Platform coverage*: all *Preference*: *dom.shadowdom.selection_across_boundary.enabled. *It's only enabled in Nightly for now. *Link to standards-positions discussion*: https://github.com/mfreed7/shadow-dom-selection. *Other browsers*: - Blink: I am quite sure they are positive, given they contributed to the spec design heavily, however I couldn't find a reference to it. - WebKit: Shipped since 17.0 *web-platform-tests*: https://github.com/web-platform-tests/wpt/blob/2b057d90e32114618d004c5a8c6eff351b8a4fbd/shadow-dom/selection-getComposedRanges.tentative.html, https://github.com/web-platform-tests/wpt/blob/2b057d90e32114618d004c5a8c6eff351b8a4fbd/shadow-dom/selection-direction.tentative.html. bug 1867058 <https://bugzilla.mozilla.org/show_bug.cgi?id=1867058> also contains additional WPTs. Thanks, Sean -- You received this message because you are subscribed to the Google Groups "dev-platform@mozilla.org" group. To unsubscribe from this group and stop receiving emails from it, send an email to dev-platform+unsubscr...@mozilla.org. To view this discussion on the web visit https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/CALKhkhYCHa%3DJUAGG8ApubwWyeewMKkhWNJAOfWE1DjTmVDc-fA%40mail.gmail.com.