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