Adds event listeners to a Window and manages their lifecycle within the current effect scope.
The type of the event.
The window to attach the event listener to.
The event or events to listen for.
The listener or listeners to handle the event.
Optionaloptions: MaybeRefOrGetter<boolean | AddEventListenerOptions>Optional configuration options.
A function to remove the event listeners.
Adds event listeners to a Document and manages their lifecycle within the current effect scope.
The type of the event.
The document to attach the event listener to.
The event or events to listen for.
The listener or listeners to handle the event.
Optionaloptions: MaybeRefOrGetter<boolean | AddEventListenerOptions>Optional configuration options.
A function to remove the event listeners.
Adds event listeners to an ComponentPublicInstance and manages their lifecycle within the current effect scope.
The type of the event.
The ComponentPublicInstance to attach the event listener to.
The event or events to listen for.
The listener or listeners to handle the event.
Optionaloptions: MaybeRefOrGetter<boolean | AddEventListenerOptions>Optional configuration options.
A function to remove the event listeners.
Adds event listeners to an HTMLElement and manages their lifecycle within the current effect scope.
The type of the event.
The HTMLElement to attach the event listener to.
The event or events to listen for.
The listener or listeners to handle the event.
Optionaloptions: MaybeRefOrGetter<boolean | AddEventListenerOptions>Optional configuration options.
A function to remove the event listeners.
Adds event listeners to an SVGElement and manages their lifecycle within the current effect scope.
The type of the event.
The SVGElement to attach the event listener to.
The event or events to listen for.
The listener or listeners to handle the event.
Optionaloptions: MaybeRefOrGetter<boolean | AddEventListenerOptions>Optional configuration options.
A function to remove the event listeners.
Adds event listeners to an EventTarget and manages their lifecycle within the current effect scope.
The type of the event.
The event target to attach the event listener to.
The event or events to listen for.
The listener or listeners to handle the event.
Optionaloptions: MaybeRefOrGetter<boolean | AddEventListenerOptions>Optional configuration options.
A function to remove the event listeners.
Adds event listeners to an EventTarget and manages their lifecycle within the current effect scope.
Example
Template: T
The type of the event.
Param: target
The event target to attach the event listener to.
Param: event
The event or events to listen for.
Param: listener
The listener or listeners to handle the event.
Param: options
Optional configuration options.
Returns
A function to remove the event listeners.