diff --git a/docs/api/menu.md b/docs/api/menu.md index e01666ef1e..2dea1c8eb9 100644 --- a/docs/api/menu.md +++ b/docs/api/menu.md @@ -59,7 +59,7 @@ will become properties of the constructed menu items. The `menu` object has the following instance methods: -#### `menu.popup([browserWindow, options])` +#### `menu.popup([browserWindow, options, callback])` * `browserWindow` [BrowserWindow](browser-window.md) (optional) - Default is the focused window. * `options` Object (optional) @@ -70,6 +70,7 @@ The `menu` object has the following instance methods: * `positioningItem` Number (optional) _macOS_ - The index of the menu item to be positioned under the mouse cursor at the specified coordinates. Default is -1. +* `callback` Function (optional) - Called when menu is closed. Pops up this menu as a context menu in the [`BrowserWindow`](browser-window.md). @@ -118,6 +119,9 @@ the following events: Emitted when the menu is closed. +Note that one menu can be shown for multiple windows, and in this case the +`closed` event would be emitted for multiple times. + ## Examples The `Menu` class is only available in the main process, but you can also use it