mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
Merge pull request #11167 from simast/menu-typings-fix
Improve setApplicationMenu/getApplicationMenu docs
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
## Class: Menu
|
||||
|
||||
|
||||
> Create native application menus and context menus.
|
||||
|
||||
Process: [Main](../glossary.md#main-process)
|
||||
@@ -15,7 +14,7 @@ The `menu` class has the following static methods:
|
||||
|
||||
#### `Menu.setApplicationMenu(menu)`
|
||||
|
||||
* `menu` Menu
|
||||
* `menu` Menu | null
|
||||
|
||||
Sets `menu` as the application menu on macOS. On Windows and Linux, the
|
||||
`menu` will be set as each window's top menu.
|
||||
@@ -27,7 +26,7 @@ effect on macOS.
|
||||
|
||||
#### `Menu.getApplicationMenu()`
|
||||
|
||||
Returns `Menu` - The application menu, if set, or `null`, if not set.
|
||||
Returns `Menu | null` - The application menu, if set, or `null`, if not set.
|
||||
|
||||
**Note:** The returned `Menu` instance doesn't support dynamic addition or
|
||||
removal of menu items. [Instance properties](#instance-properties) can still
|
||||
|
||||
Reference in New Issue
Block a user