title: Two browsers in the same Electron window
body: <p>I'd like to have <strong>one single Electron window</strong>, split in two parts:</p>
  
  <ul>
  <li>the left part is a <code>BrowserWindow</code> loading <a href="https://gmail.com" rel="noreferrer">https://gmail.com</a></li>
  <li><p>the right part is another <code>BrowserWindow</code> loading Gmail too, but I'd like these two browsers to be "independent", i.e. the cookies/LocalStorage/etc. should be independent (like if we have a normal Chrome window vs. a incognito window) ; thus allowing to have one Gmail account on left / another account connected on the right part</p></li>
  <li><p>some other UI buttons on top of the single Electron window.</p></li>
  </ul>
  
  <p>This code works, but it creates 2 windows instead of one:</p>
  
  <pre><code>const { app, BrowserWindow } = require('electron')
  const path = require('path')
  
  app.once('ready', () =&gt; {
    let win = new BrowserWindow({show: false})
    win.once('show', () =&gt; { win.webContents.executeJavaScript('validateFlights()') })
    win.loadURL('https://www.gmail.com')
    win.show()
  
    let win2 = new BrowserWindow({show: false})
    win2.once('show', () =&gt; { win.webContents.executeJavaScript('validateFlights()') })
    win2.loadURL('https://www.gmail.com')
    win2.show()
  })
  </code></pre>
  
  <p><strong>How to have them in one window?</strong></p>