old-documentation
old-documentation copied to clipboard
How to add multiple listeners to custom events?
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.