Creates a new event target.
Adds an event listener to the event target.
Type of event to listen for
Function to call when the event is triggered
Dispatches an event to the event target.
Events are processed in the engine event queue at the beginning of each frame in order that they were dispatched.
Type of event to dispatch
Optionalpayload: Record<string, unknown>
Payload of the event
Dispatches an event to the event target immediately.
Events are processed immediately and not added to the engine event queue.
Type of event to dispatch
Optionalpayload: Record<string, unknown>
Payload of the event
Gets the event listeners for the event target.
Type of event to get the listeners for
Event listeners for the event target
Removes all event listeners from the event target.
Removes an event listener from the event target.
Type of event to remove the listener for
Function to remove the listener for
Base class for all event targets.