n-standard] * A single character used as the shortcut key. This should be one of the * characters that appears in the label. * Function click * Will be called with click(menuItem, browserWindow) when the menu item * is clicked * String type * Can be normal, separator, submenu, checkbox or radio * String label * String image * Boolean enabled * If false, the menu item will be greyed out and unclickable. * Boolean checked * Should only be specified for checkbox or radio type menu items. * Menu submenu * Should be specified for submenu type menu items. If submenu is specified, * the type: 'submenu' can be omitted. If the value is not a Menu then it * will be automatically converted to one using Menu.buildFromTemplate. * Boolean visible * If false, the menu item will be entirely hidden. */ function MenuItem({ accelerator = null, accesskey = null, l10nID = null, checked = false, click = () => {}, disabled = false, hover = () => {}, id = null, label = "", image = null, submenu = null, type = "normal", visible = true, } = {}) { this.accelerator = accelerator; this.accesskey = accesskey; this.l10nID = l10nID; this.checked = checked; this.click = click; this.disabled = disabled; this.hover = hover; this.id = id; this.label = label; this.image = image; this.submenu = submenu; this.type = type; this.visible = visible; } module.exports = MenuItem; PK