Skip to content

Expose "on" -function #114

Open
Open
@swelet

Description

@swelet

Thanks for all the work that you guys do.

I think the Browser.Events.on -function should be exposed.

With the Html.Events.on function we can listen for custom js-events on elements in the Dom. I miss a way of doing the same for Document through subscriptions. Say I want to use a custom drag and drop library in js, I could listen for this event:

someElement.dispatchEvent(new CustomEvent('customDragStart'));

but not make a subscription of this

document.dispatchEvent(new CustomEvent('customDrop'));

I think exposing Browser.Events.on would be both useful and consistent with the api in Html.Events.

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