Update menu.popup docs to take options object
authorKevin Sawicki <kevinsawicki@gmail.com>
Thu, 16 Feb 2017 16:34:39 +0000 (08:34 -0800)
committerKevin Sawicki <kevinsawicki@gmail.com>
Wed, 22 Feb 2017 18:30:28 +0000 (10:30 -0800)
docs/api/menu.md

index b9bdc36..6969c44 100644 (file)
@@ -52,14 +52,20 @@ will become properties of the constructed menu items.
 
 The `menu` object has the following instance methods:
 
-#### `menu.popup([browserWindow, x, y, positioningItem])`
-
-* `browserWindow` BrowserWindow (optional) - Default is `BrowserWindow.getFocusedWindow()`.
-* `x` Number (optional) - Default is the current mouse cursor position.
-* `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
-  be positioned under the mouse cursor at the specified coordinates. Default is
-  -1.
+#### `menu.popup([browserWindow, options])`
+
+* `browserWindow` BrowserWindow (optional) - Default is
+  `BrowserWindow.getFocusedWindow()`.
+* `options` Object (optional)
+  * `x` Number (optional) - Default is the current mouse cursor position.
+  * `y` Number (**required** if `x` is used) - Default is the current mouse
+    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`.