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): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| event | "click" | The event name. |
| listener | (event: ElectronKeyboardEvent, bounds: ElectronRectangle, position: ElectronPoint) => void | The event handler receiving the event, the bounds of the tray icon, and the position of the event. |
Returns: this — This tray instance.