mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
add documentation for new menu events
This commit is contained in:
@@ -99,6 +99,29 @@ Returns `MenuItem` the item with the specified `id`
|
||||
|
||||
Inserts the `menuItem` to the `pos` position of the menu.
|
||||
|
||||
### Instance Events
|
||||
|
||||
Objects created with `new Menu` emit the following events:
|
||||
|
||||
**Note:** Some events are only available on specific operating systems and are
|
||||
labeled as such.
|
||||
|
||||
#### Event: 'menu-will-show' _macOS_
|
||||
|
||||
Returns:
|
||||
|
||||
* `event` Event
|
||||
|
||||
Emitted when `menu.popup()` is called.
|
||||
|
||||
#### Event: 'menu-will-close' _macOS_
|
||||
|
||||
Returns:
|
||||
|
||||
* `event` Event
|
||||
|
||||
Emitted when a popup is close either manually or with `menu.closePopup()`
|
||||
|
||||
### Instance Properties
|
||||
|
||||
`menu` objects also have the following properties:
|
||||
|
||||
Reference in New Issue
Block a user