Dispatches an event with a given name and payload to all registered listeners. If no listeners are registered for the event name, or if no EventSource has been initialized, this method does nothing.
The name of the event to fire.
The payload (event object) to pass to the listeners.
Optionalurl: stringRemoves a previously registered event listener. If the listener was not found or no events were registered, this method does nothing.
The name of the event from which to remove the listener.
The specific listener function to remove.
Registers an event listener for a specific event name.
The listener will be invoked when an event with the given name is fired.
Returns an object with an off() method, which can be used to conveniently remove this specific listener.
The name of the event to listen for.
The callback function to execute when the event is fired.
An object containing an off() method to unsubscribe the listener.
Sets an interval that repeatedly executes a callback function after a specified delay. If a timeout with the same name already exists, it will be cleared before the new one is set.
A unique string identifier for this timeout.
The delay in milliseconds before the callback is executed.
The function to execute after the delay.
Sets a timeout that executes a callback function after a specified delay. If a timeout with the same name already exists, it will be cleared before the new one is set.
A unique string identifier for this timeout.
The delay in milliseconds before the callback is executed.
The function to execute after the delay.
CoreElement
A lightweight base class that provides two orthogonal utilities commonly needed by UI or domain objects:
The class is generic over an EventMap
Ewhich maps event name keys to the payload type for that event. This enables compile-time type safety for listeners and fired events.Template parameters: