MenuItemConstructorOptions
Properties
default is true
, and when false
will prevent the accelerator from triggering the item if the item is not visible.
Inserts this item after the item with the specified label. If the referenced item doesn't exist the item will be inserted at the end of the menu.
Provides a means for a single context menu to declare the placement of their containing group after the containing group of the item with the specified label.
Inserts this item before the item with the specified label. If the referenced item doesn't exist the item will be inserted at the end of the menu. Also implies that the menu item in question should be placed in the same “group” as the item.
Provides a means for a single context menu to declare the placement of their containing group before the containing group of the item with the specified label.
Will be called with click(menuItem, browserWindow, event)
when the menu item is clicked.
If false, the accelerator won't be registered with the system, but it will still be displayed. Defaults to true.
Can be undo
, redo
, cut
, copy
, paste
, pasteAndMatchStyle
, delete
, selectAll
, reload
, forceReload
, toggleDevTools
, resetZoom
, zoomIn
, zoomOut
, toggleSpellChecker
, togglefullscreen
, window
, minimize
, close
, help
, about
, services
, hide
, hideOthers
, unhide
, quit
, showSubstitutions
, toggleSmartQuotes
, toggleSmartDashes
, toggleTextReplacement
, startSpeaking
, stopSpeaking
, zoom
, front
, appMenu
, fileMenu
, editMenu
, viewMenu
, shareMenu
, recentDocuments
, toggleTabBar
, selectNextTab
, selectPreviousTab
, showAllTabs
, mergeAllWindows
, clearRecentDocuments
, moveTabToNewWindow
or windowMenu
The item to share when the role
is shareMenu
.
Can be normal
, separator
, submenu
, checkbox
or radio
.