ElectronMenu.buildFromTemplate method
ElectronMenu › buildFromTemplate
Unofficial
Generally, thetemplate is an array of options for constructing a menu item.You can also attach other fields to the elements of the
template and they will become properties of the constructed menu items. Signature:
buildFromTemplate(template: (ElectronMenuItem | ElectronMenuItemConstructorOptions)[]): ElectronMenuParameters:
| Parameter | Type | Description |
|---|---|---|
| template | (ElectronMenuItem | ElectronMenuItemConstructorOptions)[] | The template describing the menu items. |
Returns: ElectronMenu — The constructed menu.