standardize all javascript blocks in English docs

This commit is contained in:
Zeke Sikelianos 2016-07-25 18:39:25 -07:00
parent dd9935a9d7
commit 06a354a2eb
37 changed files with 567 additions and 445 deletions

View file

@ -13,7 +13,7 @@ app.on('ready', () => {
{label: 'Item2', type: 'radio'},
{label: 'Item3', type: 'radio', checked: true},
{label: 'Item4', type: 'radio'}
]);
])
tray.setToolTip('This is my application.')
tray.setContextMenu(contextMenu)
})
@ -31,8 +31,18 @@ __Platform limitations:__
you have to call `setContextMenu` again. For example:
```javascript
contextMenu.items[2].checked = false;
appIcon.setContextMenu(contextMenu);
const {Menu, Tray} = require('electron')
const appIcon = new Tray('/path/to/my/icon')
const contextMenu = Menu.buildFromTemplate([
{label: 'Item1', type: 'radio'},
{label: 'Item2', type: 'radio'}
])
// Make a change to the context menu
contextMenu.items[2].checked = false
// Call this again for Linux because we modified the context menu
appIcon.setContextMenu(contextMenu)
```
* On Windows it is recommended to use `ICO` icons to get best visual effects.