addListener
Registers a listener to receive events.
The listener will be notified whenever an event of type E occurs. Multiple listeners can be registered, and they will all receive the same events.
Parameters
listener
The listener to register for receiving events