Skip to content

[Custom Highlight API Extensions] Fire events on originating element rather than make Highlight an EventTarget? #1430

Open

Description

@dandclark

We had previously looked at making Highlight an EventTarget: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/highlight/events-explainer.md.

Most of the use cases we were solving for then were instead taken care of with highlightsFromPoint. Seems this is a good reason to try again.

As an alternative though, would it be workable to have the animation events fire against the originating element(s) instead? That could avoid some of the interesting questions that we ran into when considering how event path construction and bubbling should work when highlights are in the event path.

Activity

  1. bramus commented on Oct 24, 2026

    @bramus

    There is overlap with CSSPseudoElement here. Right now events trigger on the ultimate originating element, and there is a pseudoTarget property on the Event to get the pseudo (if any)

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions