Core
Framework v2.x
2

off() #

Available since 2.9.0

Unregisters a listener.

If multiple instances of the same listener are registered, only the first one is removed.

Copied to clipboard!
off (event: string, listener: ClusterEventHandler): Promise<void>

Argument Type Description
event
string
Event name
listener
ClusterEventHandler
Listener function to remove.

Usage #

Copied to clipboard!
function listener (payload) {
  // ... listener code ...
}

app.cluster.on('some:event', listener);

app.cluster.off('some:event', listener);