blockly > ContextMenu > show
ContextMenu.show() function
Construct the menu based on the list of options and show the menu.
Signature:
export declare function show(menuOpenEvent: Event, options: (ContextMenuOption | LegacyContextMenuOption)[], rtl: boolean, workspace?: WorkspaceSvg, location?: Coordinate): void;
Parameters
Parameter | Type | Description |
|---|---|---|
menuOpenEvent | Event | Event that caused the menu to open. |
options | (ContextMenuOption | LegacyContextMenuOption)[] | Array of menu options. |
rtl | boolean | True if RTL, false if LTR. |
workspace | (Optional) The workspace associated with the context menu, if any. | |
location | (Optional) The screen coordinates at which to show the menu. |
Returns:
void