Browse Source

docs: Fix undefined variables

DaveJ 8 years ago
parent
commit
322fe36dea
1 changed files with 4 additions and 0 deletions
  1. 4 0
      docs/api/tray.md

+ 4 - 0
docs/api/tray.md

@@ -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')
 })