electron/spec/fixtures/api/quit-app/main.js

13 lines
267 B
JavaScript
Raw Normal View History

2016-03-25 13:03:49 -07:00
var app = require('electron').app
2015-12-07 17:05:08 -08:00
app.on('ready', function () {
2015-12-09 18:39:59 -08:00
// This setImmediate call gets the spec passing on Linux
setImmediate(function () {
2016-03-25 13:03:49 -07:00
app.exit(123)
})
})
2015-12-07 17:05:08 -08:00
process.on('exit', function (code) {
2016-03-25 13:03:49 -07:00
console.log('Exit event with code: ' + code)
})