docs: Document the new style of remote module

This commit is contained in:
Cheng Zhao 2015-11-13 22:34:00 +08:00
parent 94e24abb99
commit 5cacf79bc5
4 changed files with 14 additions and 5 deletions

View file

@ -17,8 +17,8 @@ the user right clicks the page:
<!-- index.html -->
<script>
const remote = require('electron').remote;
const Menu = remote.require('electron').Menu;
const MenuItem = remote.require('electron').MenuItem;
const Menu = remote.Menu;
const MenuItem = remote.MenuItem;
var menu = new Menu();
menu.append(new MenuItem({ label: 'MenuItem1', click: function() { console.log('item 1 clicked'); } }));