The BrowserWindow
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 remote
module, as is shown in this demo.
There are a lot of options when creating a new window. A few are in this demo, but visit the documentation(opens in new window)
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 show
property to false
when defining the new window.
var win = new BrowserWindow({
width: 400, height: 225, show: false
})