popup

external fun popup(): Promise<Void>(source)
external fun popup(at: PhysicalPosition = definedExternally, window: Window = definedExternally): Promise<Void>(source)
external fun popup(at: LogicalPosition = definedExternally, window: Window = definedExternally): Promise<Void>(source)
external fun popup(at: Position = definedExternally, window: Window = definedExternally): Promise<Void>(source)

Popup this menu as a context menu on the specified window.

Call it from a contextmenu DOM listener (and preventDefault() on the event) to replace the webview context menu with a native one. The promise resolves as soon as the menu is shown, not when an item is picked: use each item's action handler for that.

Parameters

at

If a position is provided, it is relative to the window's top-left corner. If there isn't one provided, the menu will pop up at the current location of the mouse.

window

The window to show the menu on. Defaults to the current window.