electron/spec/fixtures/api/window-all-closed/main.js

21 lines
375 B
JavaScript
Raw Normal View History

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()
})
app.on('ready', () => {
const win = new BrowserWindow()
win.close()
})