Merge pull request #5999 from greggman/update-menu-docs-1

Document Menu.setApplicationMenu from main process
This commit is contained in:
Cheng Zhao 2016-06-13 01:42:47 +00:00 committed by GitHub
commit 9b566d8a40

View file

@ -206,6 +206,15 @@ The `menu` class has the following methods:
Sets `menu` as the application menu on OS X. On Windows and Linux, the `menu`
will be set as each window's top menu.
**NOTE** if calling from the main process you can not call this function until after you've recevied the `'ready'` event from the application.
```
app.on('ready', () => {
Menu.setApplicationMenu(menu);
...
});
```
### `Menu.sendActionToFirstResponder(action)` _OS X_
* `action` String