Skip to main content

Home > 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

ParameterTypeDescription
menuOpenEventEventEvent that caused the menu to open.
options(ContextMenuOption | LegacyContextMenuOption)[]Array of menu options.
rtlbooleanTrue if RTL, false if LTR.
workspaceWorkspaceSvg(Optional) The workspace associated with the context menu, if any.
locationCoordinate(Optional) The screen coordinates at which to show the menu.

Returns:

void