2020-03-20 14:28:31 -06:00
|
|
|
const { app, BrowserWindow } = require('electron');
|
2019-01-15 13:35:53 -07:00
|
|
|
|
2020-03-20 14:28:31 -06:00
|
|
|
let handled = false;
|
2019-01-15 13:35:53 -07:00
|
|
|
|
|
|
|
if (app.commandLine.hasSwitch('handle-event')) {
|
|
|
|
app.on('window-all-closed', () => {
|
2020-03-20 14:28:31 -06:00
|
|
|
handled = true;
|
|
|
|
app.quit();
|
|
|
|
});
|
2019-01-15 13:35:53 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
app.on('quit', () => {
|
2020-03-20 14:28:31 -06:00
|
|
|
process.stdout.write(JSON.stringify(handled));
|
|
|
|
process.stdout.end();
|
|
|
|
});
|
2019-01-15 13:35:53 -07:00
|
|
|
|
2020-02-03 15:43:22 -07:00
|
|
|
app.whenReady().then(() => {
|
2020-06-25 11:55:17 -06:00
|
|
|
const win = new BrowserWindow({
|
|
|
|
webPreferences: {
|
|
|
|
contextIsolation: true
|
|
|
|
}
|
|
|
|
});
|
2020-03-20 14:28:31 -06:00
|
|
|
win.close();
|
|
|
|
});
|