Update browser-window.md

Made it more clear on how to define BrowserWindow (outside of the main process, specifically)
This commit is contained in:
Laekh 2015-12-10 21:48:52 +01:00 committed by Cheng Zhao
parent a6976b7d83
commit fdef3d56b8

View file

@ -4,8 +4,12 @@ The `BrowserWindow` class gives you the ability to create a browser window. For
example:
```javascript
// In the main process.
const BrowserWindow = require('electron').BrowserWindow;
// Or in the renderer process.
const BrowserWindow = require('electron').remote.BrowserWindow;
var win = new BrowserWindow({ width: 800, height: 600, show: false });
win.on('closed', function() {
win = null;