Update menu.popup docs to take options object
This commit is contained in:
parent
66b6b4f1cb
commit
d686cf77e9
1 changed files with 13 additions and 7 deletions
|
@ -52,14 +52,20 @@ will become properties of the constructed menu items.
|
||||||
|
|
||||||
The `menu` object has the following instance methods:
|
The `menu` object has the following instance methods:
|
||||||
|
|
||||||
#### `menu.popup([browserWindow, x, y, positioningItem])`
|
#### `menu.popup([browserWindow, options])`
|
||||||
|
|
||||||
* `browserWindow` BrowserWindow (optional) - Default is `BrowserWindow.getFocusedWindow()`.
|
* `browserWindow` BrowserWindow (optional) - Default is
|
||||||
* `x` Number (optional) - Default is the current mouse cursor position.
|
`BrowserWindow.getFocusedWindow()`.
|
||||||
* `y` Number (**required** if `x` is used) - Default is the current mouse cursor position.
|
* `options` Object (optional)
|
||||||
* `positioningItem` Number (optional) _macOS_ - The index of the menu item to
|
* `x` Number (optional) - Default is the current mouse cursor position.
|
||||||
be positioned under the mouse cursor at the specified coordinates. Default is
|
* `y` Number (**required** if `x` is used) - Default is the current mouse
|
||||||
-1.
|
cursor position.
|
||||||
|
* `async` Boolean (optional) - Set to `true` to have this method return
|
||||||
|
immediately called, `false` to return after the menu has been selected
|
||||||
|
or closed. Defaults to `false`.
|
||||||
|
* `positioningItem` Number (optional) _macOS_ - The index of the menu item to
|
||||||
|
be positioned under the mouse cursor at the specified coordinates. Default
|
||||||
|
is -1.
|
||||||
|
|
||||||
Pops up this menu as a context menu in the `browserWindow`.
|
Pops up this menu as a context menu in the `browserWindow`.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue