2020-03-20 20:28:31 +00:00
|
|
|
const { app, BrowserWindow } = require('electron');
|
2017-04-06 22:02:32 +00:00
|
|
|
|
2020-03-20 20:28:31 +00:00
|
|
|
const windows = [];
|
2017-04-06 22:02:32 +00:00
|
|
|
|
|
|
|
function createWindow (id) {
|
2020-03-20 20:28:31 +00:00
|
|
|
const window = new BrowserWindow({ show: false });
|
|
|
|
window.loadURL(`data:,window${id}`);
|
|
|
|
windows.push(window);
|
2017-04-06 22:02:32 +00:00
|
|
|
}
|
|
|
|
|
2020-02-03 22:43:22 +00:00
|
|
|
app.whenReady().then(() => {
|
2017-04-06 22:02:32 +00:00
|
|
|
for (let i = 1; i <= 5; i++) {
|
2020-03-20 20:28:31 +00:00
|
|
|
createWindow(i);
|
2017-04-06 22:02:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
setImmediate(function () {
|
2020-03-20 20:28:31 +00:00
|
|
|
app.exit(123);
|
|
|
|
});
|
|
|
|
});
|