docs: Fix undefined variables
This commit is contained in:
parent
4823b5582f
commit
322fe36dea
1 changed files with 4 additions and 0 deletions
|
@ -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')
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue