Skip to content

Event.target should return null after dispatch is complete, when stopped at ShadowRoot #511

@TakayoshiKochi

Description

@TakayoshiKochi

https://dom.spec.whatwg.org/#dispatching-events doesn't specify any operation on event.target after dispatching is done (step 14 and after). This leaves event.taget as what it was when the event was last set in step 13.1.

This, in turn, means that when the event is stopped at shadow root, and the reference to the event is stored somewhere in the event handler, the last event.target would sort of leak after dispatch is complete.

Would like to reset event.target to null when the event stopped at shadow root.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: shadowRelates to shadow trees (as defined in DOM)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions