FluentUI Compat

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

IEventTarget

(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

EventListenerOptions

(Optional) Optional event listener options that match the original registration

Returns:

EventGroup

This EventGroup instance for method chaining

  • Edit this page
In this article
Back to top FluentUI React complimentary components and utilities focused on render performance