Skip to main content

blockly > MenuItem > (constructor)

Constructs a new instance of the MenuItem class

Signature:

constructor(content: string | HTMLElement, opt_value?: string | undefined);

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

(Optional) Data/model associated with the menu item.