Add menu parameter for Tray.popUpContextMenu

This commit is contained in:
Cheng Zhao 2015-12-02 18:43:11 +08:00
parent 202475f5a9
commit 2fba05b5e7
8 changed files with 23 additions and 10 deletions

View file

@ -187,12 +187,16 @@ when the tray icon is clicked. Defaults to true.
Displays a tray balloon.
### `Tray.popUpContextMenu([position])` _OS X_ _Windows_
### `Tray.popUpContextMenu([menu, position])` _OS X_ _Windows_
* `position` Object (optional)- The pop up position.
* `menu` Menu (optional)
* `position` Object (optional) - The pop up position.
* `x` Integer
* `y` Integer
Popups the context menu of tray icon. When `menu` is passed, the `menu` will
showed instead of the tray's context menu.
The `position` is only available on Windows, and it is (0, 0) by default.
### `Tray.setContextMenu(menu)`