Skip to content

Adding HighlightRange to the selection #14

Description

@Reinmar

My understanding is that since HighlightRange inherits from Range, it can be passed to Selection#addRange().

According to https://www.w3.org/TR/selection-api/#dom-selection-addrange that range is passed there by a reference and it should be updated once the selection changes.

Does it mean that someone can add a highlight range to the selection? And, if so, could it cause some problems?

Also, we could imagine that the selection is highlighting its ranges internally (so ::selection ~== ::highlight(selection)). I wonder if this could have some interesting implications.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions