Electron - How to load a html file into the current window?

If you want to load a new URL in an existing window you can do this in the renderer process:

const { remote } = require('electron')
remote.getCurrentWindow().loadURL('https://github.com')

Note that Electron restarts the renderer process when a new URL is loaded, so you'll probably see a flash when that happens. This is why it's usually best to use a single page application (SPA) architecture when building Electron apps.