My app structure overview:
win.loadURL
, has no access to electron
).
window.open(url, '_blank')
.Currently, when opening multiple subwindows, the later opened will replace the former opened, how to keep them all open, instead of replacing each other?
Update: in Electron 15, nativeWindowOpen
defaults to true
.
You should enable nativeWindowOpen
on your main window.
new BrowserWindow({ webPreferences: { nativeWindowOpen: true } })
Then, each window.open
call (assuming you aren't using the same window name, not counting special window names like '_blank'
) will open a brand new window.