add documentation for new menu events

This commit is contained in:
Shelley Vohr 2018-01-27 11:28:42 -05:00
parent e345342e36
commit e81265bc7f
No known key found for this signature in database
GPG key ID: F13993A75599653C

View file

@ -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: