Home > @cascadiacollections/fluentui-compat > EventGroup > off
EventGroup.off() method
Removes event listeners from the specified target.
This method can remove: - All events from a target (if only target is provided) - All events of a specific type from a target (if target and eventName provided) - A specific event listener (if all parameters provided)
Signature:
off(target?: IEventTarget, eventName?: string, callback?: EventListener | ((...args: any[]) => void), options?: EventListenerOptions): EventGroup;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
target |
(Optional) The event target to remove listeners from | |
|
eventName |
string |
(Optional) Optional event name to filter removal |
|
callback |
EventListener | ((...args: any[]) => void) |
(Optional) Optional specific callback to remove |
|
options |
(Optional) Optional event listener options that match the original registration |
Returns:
This EventGroup instance for method chaining