From: Laekh Date: Thu, 10 Dec 2015 20:48:52 +0000 (+0100) Subject: Update browser-window.md X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fdef3d56b82c159dfd3cb383b4dc6477f5e79c60;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Update browser-window.md Made it more clear on how to define BrowserWindow (outside of the main process, specifically) --- 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;