Skip to content

[css-pseudo-4] clarify ::selection applies to programatically created selection #3425

@myakura

Description

@myakura

In https://drafts.csswg.org/css-pseudo-4/#selectordef-selection the spec says:

The ::selection and ::inactive-selection pseudo-elements represent the portion of a document that has been highlighted by the user.

However, it is possible that web apps can create selections with DOM Ranges and Selection APIs. And ::selection applies to those programatically created selections. Perhaps spec should take such non-user initiated selection into account?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions