docs: Reword the requirement of setApplication Menu
This commit is contained in:
parent
9b566d8a40
commit
4f1f0add27
1 changed files with 1 additions and 8 deletions
|
@ -206,14 +206,7 @@ The `menu` class has the following methods:
|
||||||
Sets `menu` as the application menu on OS X. On Windows and Linux, the `menu`
|
Sets `menu` as the application menu on OS X. On Windows and Linux, the `menu`
|
||||||
will be set as each window's top 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.
|
**Note:** This API has to be called after the `ready` event of `app` module.
|
||||||
|
|
||||||
```
|
|
||||||
app.on('ready', () => {
|
|
||||||
Menu.setApplicationMenu(menu);
|
|
||||||
...
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
### `Menu.sendActionToFirstResponder(action)` _OS X_
|
### `Menu.sendActionToFirstResponder(action)` _OS X_
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue