Skip to content
This repository was archived by the owner on Oct 13, 2022. It is now read-only.
This repository was archived by the owner on Oct 13, 2022. It is now read-only.

How to add multiple listeners to custom events? #678

@tcdrop

Description

@tcdrop

The documentation page "https://docs.decentraland.org/development-guide/custom-events/" states that to add a listener you have to call "events.addListener()".

That works for a single listener, but when adding a second one with the second parameter being "null", the error "The provided listener is already registered" is thrown.

The documentation should be more detailed instead of just saying "The listener to use. This will almost always be null." about the second parameter of the "addListener" function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions