mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
docs: Fix undefined variables
This commit is contained in:
@@ -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')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user