Skip to main content

Interface: ActionContextMenuOption

Defined in: packages/blockly/core/contextmenu_registry.ts:229

A representation of a normal, clickable menu item in contextmenu.ts.

Extends

Properties index

PropertyDescription
id-
scope-
weight-
associatedKeyboardShortcut-
text-
enabled-
callback-
separator-

Properties

id

id: string;

Defined in: packages/blockly/core/contextmenu_registry.ts:220

Inherited from

CoreContextMenuOption.id


scope

scope: Scope;

Defined in: packages/blockly/core/contextmenu_registry.ts:221

Inherited from

CoreContextMenuOption.scope


weight

weight: number;

Defined in: packages/blockly/core/contextmenu_registry.ts:222

Inherited from

CoreContextMenuOption.weight


associatedKeyboardShortcut?

optional associatedKeyboardShortcut?: string;

Defined in: packages/blockly/core/contextmenu_registry.ts:223

Inherited from

CoreContextMenuOption.associatedKeyboardShortcut


text

text: string | HTMLElement;

Defined in: packages/blockly/core/contextmenu_registry.ts:230


enabled

enabled: boolean;

Defined in: packages/blockly/core/contextmenu_registry.ts:231


callback

callback: (scope, menuOpenEvent, menuSelectEvent, location) => void;

Defined in: packages/blockly/core/contextmenu_registry.ts:239

Parameters

ParameterTypeDescription
scopeScopeObject that provides a reference to the thing that had its context menu opened.
menuOpenEventEventThe original event that triggered the context menu to open.
menuSelectEventEventThe event that triggered the option being selected.
locationCoordinateThe location in screen coordinates where the menu was opened.

Returns

void


separator?

optional separator?: undefined;

Defined in: packages/blockly/core/contextmenu_registry.ts:245