You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>Each browser window is a separate process, known as the renderer process. This process, like the main process that controls the life cycle of the app, has full access to the Node.js APIs.
<p>Open the <ahref="http://electron.atom.io/docs/api/browser-window">full API documentation<spanclass="u-visible-to-screen-reader">(opens in new window)</span></a> in your browser.</p>
<p>The <code>BrowserWindow</code> module gives you the ability to create new windows in your app. This main process module can be used from the renderer process with the <code>remote</code> module, as is shown in this demo.</p>
<p>There are a lot of options when creating a new window. A few are in this demo, but visit the <ahref="http://electron.atom.io/docs/api/browser-window">documentation<spanclass="u-visible-to-screen-reader">(opens in new window)</span></a> for the full list.</p>
<strong>Use an invisible browser window to run background tasks.</strong>
35
-
<p>You can set a new browser window to not be shown (be invisible) in order to use that additional renderer process as a kind of new thread in which to run JavaScript in the background of your app. You do this by setting the <code>show</code> property to <code>false</code> when defining the new window.</p>
<p>In this demo we create a new window and listen for <code>move</code> and <code>resize</code> events on it. Click the demo button, change the new window and see the dimensions and position update here, above.</p>
56
-
<p>There are a lot of methods for controlling the state of the window such as the size, location, and focus status as well as events to listen to for window changes. Visit the <ahref="http://electron.atom.io/docs/api/browser-window">documentation<spanclass="u-visible-to-screen-reader">(opens in new window)</span></a> for the full list.</p>
<buttonclass="demo-button disappear" id="focus-on-modal-window">Focus on Demo</button>
72
82
</div>
73
-
<p>In this demo, we create a new window and listen for <code>blur</code> event on it. Click the demo button to create a new modal window, and switch focus back to the parent window by clicking on it. You can click the <i>Focus on Demo</i> button to switch focus to the modal window again.</p>
<p>Windows can have a transparent background, too. By setting the <code>transparent</code> option to <code>true</code>, you can also make your frameless window transparent:</p>
0 commit comments