Update browser-window.md
authorLaekh <Laekh@users.noreply.github.com>
Thu, 10 Dec 2015 20:48:52 +0000 (21:48 +0100)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 11 Dec 2015 03:20:44 +0000 (11:20 +0800)
Made it more clear on how to define BrowserWindow (outside of the main process, specifically)

docs/api/browser-window.md

index 2fbd154..44c4da5 100644 (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;