@tempots/dom
DOMContext.on() method
Adds an event listener to the element.
Signature:
on<E>(event: string, listener: (event: E) => void, options?: HandlerOptions): Clear;
Parameters
Parameter |
Type |
Description |
---|---|---|
event |
string |
The event to listen for. |
listener |
(event: E) => void |
The listener to call when the event occurs. |
options |
(Optional) The options for the event listener. |
Returns: Clear
A function to remove the event listener.