diff --git a/docs/api/menu-item.md b/docs/api/menu-item.md index aa3d6ce6ee..2f0ed2eb66 100644 --- a/docs/api/menu-item.md +++ b/docs/api/menu-item.md @@ -17,7 +17,7 @@ See [`Menu`](menu.md) for examples. * `options` Object * `click` Function (optional) - Will be called with `click(menuItem, window, event)` when the menu item is clicked. - * `menuItem` MenuItem + * `menuItem` [MenuItem](menu-item.md) * `window` [BaseWindow](base-window.md) | undefined - This will not be defined if no window is open. * `event` [KeyboardEvent](structures/keyboard-event.md) * `role` string (optional) - 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` - Define the action of the menu item, when specified the @@ -91,7 +91,7 @@ It can be called with `menuItem.click(event, focusedWindow, focusedWebContents)` #### `menuItem.submenu` -A `Menu` (optional) containing the menu +A [`Menu`](menu.md) (optional) containing the menu item's submenu, if present. #### `menuItem.type` @@ -171,4 +171,4 @@ A `number` indicating an item's sequential unique id. #### `menuItem.menu` -A `Menu` that the item is a part of. +A [`Menu`](menu.md) that the item is a part of. diff --git a/docs/api/menu.md b/docs/api/menu.md index 5f814b19af..89820c2f9c 100644 --- a/docs/api/menu.md +++ b/docs/api/menu.md @@ -23,7 +23,7 @@ The `Menu` class has the following static methods: #### `Menu.setApplicationMenu(menu)` -- `menu` Menu | null +- `menu` [Menu](menu.md) | null Sets `menu` as the application menu on macOS. On Windows and Linux, the `menu` will be set as each window's top menu. @@ -65,9 +65,9 @@ for more information on macOS' native actions. #### `Menu.buildFromTemplate(template)` -- `template` (MenuItemConstructorOptions | MenuItem)[] +- `template` (MenuItemConstructorOptions | [MenuItem](menu-item.md))[] -Returns `Menu` +Returns [`Menu`](menu.md) Generally, the `template` is an array of `options` for constructing a [MenuItem](menu-item.md). The usage can be referenced above.