docs: Fix undefined variables

This commit is contained in:
DaveJ 2016-07-27 23:23:26 +01:00
parent 4823b5582f
commit 322fe36dea

View file

@ -198,6 +198,10 @@ by toggling between `'never'` and `'always'` modes when the window visibility
changes.
```js
const {BrowserWindow, Tray} = require('electron')
const win = new BrowserWindow({width: 800, height: 600})
const tray = new Tray('/path/to/my/icon')
win.on('show', () => {
tray.setHighlightMode('always')
})