Adds an event listener to the browser window.
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 to the browser window.
The name of the event to dispatch.
The details of the event to dispatch.
A promise that resolves when the event has been dispatched.
A concrete implementation of EventDispatcher that dispatches events to the browser window.