Skip to content

ElectronTray.on('mouse-down') method

ElectronTray › on(‘mouse-down’)

Unofficial

Registers a listener that is invoked when the mouse clicks the tray icon. darwin only.

Signature:

on(event: "mouse-down", listener: (event: ElectronKeyboardEvent, position: ElectronPoint) => void): this

Parameters:

Parameter Type Description
event "mouse-down" The event name.
listener (event: ElectronKeyboardEvent, position: ElectronPoint) => void The event handler receiving the event and the position of the event.

Returns: thisThis tray instance.