2018-09-13 16:10:51 +00:00
|
|
|
const { app, BrowserWindow } = require('electron')
|
2017-04-06 22:02:32 +00:00
|
|
|
|
|
|
|
const windows = []
|
|
|
|
|
|
|
|
function createWindow (id) {
|
2018-09-13 16:10:51 +00:00
|
|
|
const window = new BrowserWindow({ show: false })
|
2017-04-06 22:02:32 +00:00
|
|
|
window.loadURL(`data:,window${id}`)
|
|
|
|
windows.push(window)
|
|
|
|
}
|
|
|
|
|
|
|
|
app.once('ready', () => {
|
|
|
|
for (let i = 1; i <= 5; i++) {
|
|
|
|
createWindow(i)
|
|
|
|
}
|
|
|
|
|
|
|
|
setImmediate(function () {
|
|
|
|
app.exit(123)
|
|
|
|
})
|
|
|
|
})
|