docs: Default parameter for Menu.popup

This commit is contained in:
Cheng Zhao 2016-01-22 11:29:26 -07:00
parent ca77c95c6d
commit 2d8e5e3a16

View file

@ -239,16 +239,15 @@ will become properties of the constructed menu items.
### `Menu.popup([browserWindow, x, y, positioningItem])` ### `Menu.popup([browserWindow, x, y, positioningItem])`
* `browserWindow` BrowserWindow (optional) * `browserWindow` BrowserWindow (optional) - Default is `null`.
* `x` Number (optional) * `x` Number (optional) - Default is -1.
* `y` Number (**required** if `x` is used) * `y` Number (**required** if `x` is used) - Default is -1.
* `positioningItem` Number (optional) _OS X_ * `positioningItem` Number (optional) _OS X_ - the index of the menu item to
be positioned under the mouse cursor at the specified coordinates.
Pops up this menu as a context menu in the `browserWindow`. You Pops up this menu as a context menu in the `browserWindow`. You can optionally
can optionally provide a `x,y` coordinate to place the menu at, otherwise it provide a `x, y` coordinate to place the menu at, otherwise it will be placed
will be placed at the current mouse cursor position. `positioningItem` is the at the current mouse cursor position.
index of the menu item to be positioned under the mouse cursor at the specified
coordinates (only supported on OS X).
### `Menu.append(menuItem)` ### `Menu.append(menuItem)`