Update browser-window.md
Made it more clear on how to define BrowserWindow (outside of the main process, specifically)
This commit is contained in:
parent
a6976b7d83
commit
fdef3d56b8
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue