Adds an event listener.
The name of the event to listen for.
The listener to add.
Optional
options: AddEventListenerOptionsThe options for the listener.
A function that removes the listener.
Dispatches an event with the given name and details.
The name of the event to dispatch.
The details of the event to dispatch.
Interface for an event dispatcher that sends events.