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>The main process <code>app</code> module can be used to get the path at which your app is located on the user's computer.</p>
25
-
<p>In this example, to get that information from the renderer process, we use the <code>ipc</code> module to send a message to the main process requesting the app's path.</p>
26
-
<p>See the <ahref="http://electron.atom.io/docs/api/app">app module documentation<spanclass="u-visible-to-screen-reader">(opens in new window)</span></a> for more.</p>
<p>The <code>process</code> module is built into Node.js (therefore you can use this in both the main and renderer processes) and in Electron apps this object has a few more useful properties on it.</p>
46
-
<p>The example below gets the version of Electron in use by the app.</p>
47
-
<p>See the <ahref="http://electron.atom.io/docs/api/process">process documentation<spanclass="u-visible-to-screen-reader">(opens in new window)</span></a> for more.</p>
<strong>Find versions of Chromium, Node.js and V8.</strong>
54
-
<p>Electron also includes versions of Chromium, Node.js and V8 within the <code>process.versions</code> object. You can get there quickly by opening up developer tools in an Electron app and typing <code>process.versions</code>.</p>
55
-
<pre><codeclass="language-js">// Returns version of Chromium in use
<p>The Node.js <code>os</code> module provides useful information about the user's operating system. It's built into Node.js and can be used in both the main and renderer proesses.</p>
77
-
<p>In the example below we require the module and then return the location of the home directory.</p>
<p>See the full <ahref="https://nodejs.org/api/os.html"> os documentation<spanclass="u-visible-to-screen-reader">(opens in new window)</span></a> for more.</p>
<p>The Electron <code>screen</code> module retrieves information about screen size, displays, cursor position, etc. In the example below we retrieve the dimensions of the monitor in use.</p>
<p>See the full <ahref="http://electron.atom.io/docs/api/screen">screen documentation<spanclass="u-visible-to-screen-reader">(opens in new window)</span></a> for more.</p>
<p>The <code>.size</code> method in the example returns the raw dimensions of the screen but because of system menu bars this may not be the actual space available for your app.</p>
106
-
107
-
<p>To get the dimensions of the available screen space use the <code>.workAreaSize</code> method. Using <code>.workArea</code> will return the coordinates as well as the dimensions of the available screen space.</p>
0 commit comments