Skip to content

ElectronTray.popUpContextMenu method

ElectronTray › popUpContextMenu

Unofficial

Pops up the context menu of the tray icon. When menu is passed, the menu will be shown instead of the tray icon's context menu.

The position is only available on Windows, and it is (0, 0) by default. darwin and win32 only.

Signature:

popUpContextMenu(menu?: ElectronMenu | undefined, position?: ElectronPoint | undefined): void

Parameters:

Parameter Type Description
menu? ElectronMenu | undefined The menu to show instead of the tray icon's context menu.
position? ElectronPoint | undefined The position at which to pop up the menu.

Returns: void