Skip to content

Should we fire a HighlightRangePointerEvent on the Range that was hit, instead of the containing HighlightRangeGroup? #101

Open

Description

@sanketj

The benefit of making Range an EventTarget and firing the event on the Range object directly is that the HighlightRangePointerEvent would not need to maintain a special Range pointer internally - the hit range can be obtained via the event's target property.

On the other hand, unless we define a new event path from Range objects to their containing HighlightRangeGroups, web developers would need to create one event listener per Range in order to listen for the event on an entire group. If the event is fired on the HighlightRangeGroup instead, developers can just create a single listener on the group, which seems more convenient.

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

Metadata

Metadata

Labels

HighlightEvents

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions