Skip to content

ElectronTray.on('click') method

ElectronTray › on(‘click’)

Unofficial

Registers a listener that is invoked when the tray icon is clicked.

Signature:

on($event: "click", listener: ($event: ElectronKeyboardEvent, bounds: ElectronRectangle, position: ElectronPoint) => void): this

Parameters:

ParameterTypeDescription
$event"click"
listener($event: ElectronKeyboardEvent, bounds: ElectronRectangle, position: ElectronPoint) => voidThe event handler receiving the event, the bounds of the tray icon, and the position of the event.

Returns: this — This tray instance.