Class: MenuItem
Defined in: packages/blockly/core/menuitem.ts:20
Class representing an item in a menu.
Methods index
| Method | Description |
|---|---|
| createDom | Creates the menuitem's DOM. |
| getAriaLabel | Gets the ARIA label for this menu item. |
| dispose | Dispose of this menu item. |
Constructors
Constructor
new MenuItem(
content,
opt_value?,
ariaLabel?
): MenuItem;
Defined in: packages/blockly/core/menuitem.ts:54
Parameters
| Parameter | Type | Description |
|---|---|---|
content | string | HTMLElement | Text caption to display as the content of the item, or a HTML element to display. |
opt_value? | string | Data/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