Skip to content

Commit 9f8f82a

Browse files
docs: fix MenuItem click handler type (electron#24175)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
1 parent 306d76b commit 9f8f82a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/api/menu-item.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ See [`Menu`](menu.md) for examples.
1212
* `click` Function (optional) - Will be called with
1313
`click(menuItem, browserWindow, event)` when the menu item is clicked.
1414
* `menuItem` MenuItem
15-
* `browserWindow` [BrowserWindow](browser-window.md)
15+
* `browserWindow` [BrowserWindow](browser-window.md) | undefined - This will not be defined if no window is open.
1616
* `event` [KeyboardEvent](structures/keyboard-event.md)
1717
* `role` String (optional) - Can be `undo`, `redo`, `cut`, `copy`, `paste`, `pasteAndMatchStyle`, `delete`, `selectAll`, `reload`, `forceReload`, `toggleDevTools`, `resetZoom`, `zoomIn`, `zoomOut`, `togglefullscreen`, `window`, `minimize`, `close`, `help`, `about`, `services`, `hide`, `hideOthers`, `unhide`, `quit`, `startSpeaking`, `stopSpeaking`, `zoom`, `front`, `appMenu`, `fileMenu`, `editMenu`, `viewMenu`, `recentDocuments`, `toggleTabBar`, `selectNextTab`, `selectPreviousTab`, `mergeAllWindows`, `clearRecentDocuments`, `moveTabToNewWindow` or `windowMenu` - Define the action of the menu item, when specified the
1818
`click` property will be ignored. See [roles](#roles).

0 commit comments

Comments
 (0)