Clarify the default arguments for popup
The null / -1 defaults weren't very helpful, so changed to follow other documentation and write the behaviour if that param is missing.
This commit is contained in:
parent
729b84f2ca
commit
c365aa85c2
1 changed files with 4 additions and 6 deletions
|
@ -227,16 +227,14 @@ The `menu` object has the following instance methods:
|
||||||
|
|
||||||
#### `menu.popup([browserWindow, x, y, positioningItem])`
|
#### `menu.popup([browserWindow, x, y, positioningItem])`
|
||||||
|
|
||||||
* `browserWindow` BrowserWindow (optional) - Default is `null`.
|
* `browserWindow` BrowserWindow (optional) - Default is `BrowserWindow.getFocusedWindow()`.
|
||||||
* `x` Number (optional) - Default is -1.
|
* `x` Number (optional) - Default is the current mouse cursor position.
|
||||||
* `y` Number (**required** if `x` is used) - Default is -1.
|
* `y` Number (**required** if `x` is used) - Default is the current mouse cursor position.
|
||||||
* `positioningItem` Number (optional) _macOS_ - The index of the menu item to
|
* `positioningItem` Number (optional) _macOS_ - The index of the menu item to
|
||||||
be positioned under the mouse cursor at the specified coordinates. Default is
|
be positioned under the mouse cursor at the specified coordinates. Default is
|
||||||
-1.
|
-1.
|
||||||
|
|
||||||
Pops up this menu as a context menu in the `browserWindow`. You can optionally
|
Pops up this menu as a context menu in the `browserWindow`.
|
||||||
provide a `x, y` coordinate to place the menu at, otherwise it will be placed
|
|
||||||
at the current mouse cursor position.
|
|
||||||
|
|
||||||
#### `menu.append(menuItem)`
|
#### `menu.append(menuItem)`
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue