From fdef3d56b82c159dfd3cb383b4dc6477f5e79c60 Mon Sep 17 00:00:00 2001 From: Laekh Date: Thu, 10 Dec 2015 21:48:52 +0100 Subject: [PATCH] Update browser-window.md Made it more clear on how to define BrowserWindow (outside of the main process, specifically) --- docs/api/browser-window.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index 2fbd154..44c4da5 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -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; -- 2.7.4