Skip to content

ElectronMenuPopupOptions

Unofficial

Options for popping up a context menu.

Import:

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

Signature:

export interface ElectronMenuPopupOptions

Properties

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

Methods

MethodReturnsDescription
callback()voidCalled when the menu is closed.