electron/spec/fixtures/api/command-line/main.js
Cheng Zhao f9a1dc10fe
fix: quit after Chromium is fully started (#21488)
* fix: quit when chromium is fully started

* test: remove hacks on app.quit

* chore: RunUntilIdle is unnecessary
2019-12-13 18:57:02 +09:00

13 lines
287 B
JavaScript

const { app } = require('electron')
app.on('ready', () => {
const payload = {
hasSwitch: app.commandLine.hasSwitch('foobar'),
getSwitchValue: app.commandLine.getSwitchValue('foobar')
}
process.stdout.write(JSON.stringify(payload))
process.stdout.end()
app.quit()
})