I have an Electron app that can open different windows.
On app launch the app open a set of window(s) (that load the same HTML and JS files) but with params to change ea
For example:
Process script
In your main script write:
global.varsForWindow = { platform: process.platform };
Window script
Where you need it in a window script:
var varsFromMainScript = require('electron').remote.getGlobal('varsForWindow'); console.log(varsFromMainScript.platform);