Skip to content

ElectronMenuPopupOptions

Unofficial

Options for popping up a context menu.

Import:

import type { ElectronMenuPopupOptions } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface ElectronMenuPopupOptions

Properties

Property Type Description
positioningItem? number The index of the menu item to be positioned under the mouse cursor at the specified coordinates. darwin only.
window? ElectronBrowserWindow The window to show the popup in. When omitted, the focused window is used.
x? number The x coordinate. Must be declared if y is declared. When omitted, the current mouse cursor position is used.
y? number The y coordinate. Must be declared if x is declared. When omitted, the current mouse cursor position is used.

Methods

Method Returns Description
callback() void Called when the menu is closed.