Skip to main content

Class: MenuItem

Defined in: packages/blockly/core/menuitem.ts:20

Class representing an item in a menu.

Methods index

MethodDescription
createDomCreates the menuitem's DOM.
getAriaLabelGets the ARIA label for this menu item.
disposeDispose of this menu item.

Constructors

Constructor

new MenuItem(
content,
opt_value?,
ariaLabel?
): MenuItem;

Defined in: packages/blockly/core/menuitem.ts:54

Parameters

ParameterTypeDescription
contentstring | HTMLElementText caption to display as the content of the item, or a HTML element to display.
opt_value?stringData/model associated with the menu item.
ariaLabel?string-

Returns

MenuItem

Methods

createDom()

createDom(): Element;

Defined in: packages/blockly/core/menuitem.ts:65

Creates the menuitem's DOM.

Returns

Element

Completed DOM.


getAriaLabel()

getAriaLabel(): string;

Defined in: packages/blockly/core/menuitem.ts:114

Gets the ARIA label for this menu item.

Returns

string


dispose()

dispose(): void;

Defined in: packages/blockly/core/menuitem.ts:126

Dispose of this menu item.

Returns

void