showMenuButton Method

Show a menu button at a particular location. A menu button opens a context menu.

showMenuButton(_id: string, _menuItemsProps: AbstractMenuItemProps[], _location: XAndY, _htmlElement?: HTMLElement): boolean

Parameter Type Description
_id string Id of the menu button. Multiple menu buttons may be displayed.
_menuItemsProps AbstractMenuItemProps[] Properties of the menu items to display.
_location XAndY Location of the context menu, relative to the origin of htmlElement or the window.
_htmlElement HTMLElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.

Returns - boolean

true if the button was displayed, false if the button could not be displayed.

Defined in

Last Updated: 13 June, 2024