PopupOptions

external interface PopupOptions(source)

Properties

Link copied to clipboard
abstract var callback: () -> Unit?

Called when menu is closed.

Link copied to clipboard
abstract var frame: WebFrameMain?

Provide the relevant frame if you want certain OS-level features such as Writing Tools on macOS to function correctly. Typically, this should be params.frame from the context-menu event on a WebContents, or the focusedFrame property of a WebContents.

Link copied to clipboard
abstract var positioningItem: Double?

The index of the menu item to be positioned under the mouse cursor at the specified coordinates. Default is -1.

Link copied to clipboard

This should map to the menuSourceType provided by the context-menu event. It is not recommended to set this value manually, only provide values you receive from other APIs or leave it undefined. Can be none, mouse, keyboard, touch, touchMenu, longPress, longTap, touchHandle, stylus, adjustSelection, or adjustSelectionReset.

Link copied to clipboard
abstract var window: BaseWindow?

Default is the focused window.

Link copied to clipboard
abstract var x: Double?

Default is the current mouse cursor position. Must be declared if y is declared.

Link copied to clipboard
abstract var y: Double?

Default is the current mouse cursor position. Must be declared if x is declared.