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

How to add multiple listeners to custom events? #678

Open
j-eissler opened this issue Aug 4, 2022 · 0 comments
Open

How to add multiple listeners to custom events? #678

j-eissler opened this issue Aug 4, 2022 · 0 comments

Comments

@j-eissler
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant