Skip to content

Why Sensors trigger events in source container?Β #539

@hnrq

Description

@hnrq

I'm still playing around with this lib and I saw that SensorEvents are usually triggered in source container and the target itself is set inside the event's details. This causes some errors when trying to use Happy DOM for testing, because target should be set once the event is dispatched and should not be overriden.

However, everything breaks when triggering Sensor Events on the target itself instead of the container and I'd like to do this replacement here, because it feels like it's the right pattern imo. Any ideas for making this replacement?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions