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:

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: thisThis tray instance.