Skip to content

Composed Selection (Selection APIs for Shadow DOM) #216

Closed

Description

@hunterloftis

Description

The Shadow Selection API enables both querying and setting the document-wide selection across shadow boundaries. Currently, all browsers demonstrate divergent behavior when using the existing getSelection() API on a composed tree.

The API includes a single new API (getComposedSelection()) and backwards-compatible changes to a number of APIs (like setBaseAndExtent().

There is consensus on the shape of the API, but no spec or implementations.

Rationale

Selection does not work across or within shadow roots. This makes fully-featured rich-text editors impossible to implement with web components. Some of the web's most popular editors have issues that are blocked on this functionality:

Specification

Tests

I can't find tests for the latest API definition; should write some --

Activity

  1. moved this to Proposed in Interop 2023on Oct 14, 2022
  2. jgraham commented on Oct 26, 2022

    @jgraham
    Contributor

    Is there a prospect of having the spec on a standards track, and tests written before the Interop 2023 effort starts?

  3. hunterloftis commented on Oct 27, 2022

    @hunterloftis
    Author

    @jgraham could you share a date for when the Interop 2023 effort will start?

  4. jgraham commented on Nov 7, 2022

    @jgraham
    Contributor

    At the start of 2023.

    In practice we'd hope to see proposals that are already on a standards track, or at the very least are clearly on that path, before the proposals selection period, which is now.

  5. nairnandu commented on Feb 1, 2023

    @nairnandu
    Contributor

    Thank you for proposing Composed Selection for inclusion in Interop 2023.

    We wanted to let you know that this proposal was not selected to be part of Interop this year. The web standard for this technology, along with the appropriate tests, have not yet reached a point where inclusion in the Interop project makes sense. Resubmitting a proposal for this feature as part of a future round of Interop would be welcome.

    For an overview of our process, see the proposal selection summary. Thank you again for contributing to Interop 2023!

    Posted on behalf of the Interop team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    focus-area-proposal

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions