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
| Property | Description |
|---|---|
| id | - |
| scope | - |
| weight | - |
| associatedKeyboardShortcut | - |
| text | - |
| enabled | - |
| callback | - |
| separator | - |
Properties
id
id: string;
Defined in: packages/blockly/core/contextmenu_registry.ts:220
Inherited from
scope
scope: Scope;
Defined in: packages/blockly/core/contextmenu_registry.ts:221
Inherited from
weight
weight: number;
Defined in: packages/blockly/core/contextmenu_registry.ts:222
Inherited from
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
| Parameter | Type | Description |
|---|---|---|
scope | Scope | Object that provides a reference to the thing that had its context menu opened. |
menuOpenEvent | Event | The original event that triggered the context menu to open. |
menuSelectEvent | Event | The event that triggered the option being selected. |
location | Coordinate | The location in screen coordinates where the menu was opened. |
Returns
void
separator?
optional separator?: undefined;
Defined in: packages/blockly/core/contextmenu_registry.ts:245