Add 'quit' and 'window-all-closed' events for app module.

This commit is contained in:
Cheng Zhao 2013-05-03 10:53:54 +08:00
parent 66404b5f15
commit 9b75019898
10 changed files with 123 additions and 15 deletions

View file

@ -1,8 +1,7 @@
binding = process.atomBinding 'app'
EventEmitter = require('events').EventEmitter
class App extends EventEmitter
quit: binding.quit
terminate: binding.terminate
Application = process.atomBinding('app').Application
Application.prototype.__proto__ = EventEmitter.prototype
module.exports = new App
# Only one App object pemitted.
module.exports = new Application