Skip to content

ElectronTray.on('mouse-up') method

ElectronTray › on(‘mouse-up’)

Unofficial

Registers a listener that is invoked when the mouse is released from clicking the tray icon.

Note: This will not be emitted if you have set a context menu for your tray using ElectronTray.setContextMenu, as a result of macOS-level constraints. darwin only.

Signature:

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

Parameters:

ParameterTypeDescription
event"mouse-up"The event name.
listener(event: ElectronKeyboardEvent, position: ElectronPoint) => voidThe event handler receiving the event and the position of the event.

Returns: thisThis tray instance.