fixed code snippet in menu api documentation.
This commit is contained in:
parent
61bf3ae1ee
commit
b54af73782
1 changed files with 2 additions and 1 deletions
|
@ -15,7 +15,8 @@ the user right clicks the page:
|
|||
```html
|
||||
<!-- index.html -->
|
||||
<script>
|
||||
const { Menu, MenuItem } = require('electron').remote;
|
||||
const { remote } = require('electron');
|
||||
const { Menu, MenuItem } = remote;
|
||||
|
||||
const menu = new Menu();
|
||||
menu.append(new MenuItem({ label: 'MenuItem1', click: () => { console.log('item 1 clicked'); } }));
|
||||
|
|
Loading…
Reference in a new issue