From e66e4111381e89cd26012134520d0f0180460b5b Mon Sep 17 00:00:00 2001 From: YuHuaiChen Date: Tue, 22 Sep 2015 07:42:18 +0800 Subject: [PATCH] add app.quit --- electron/index.js | 4 ++++ localhost.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/electron/index.js b/electron/index.js index dafdb8f..5b38cb4 100644 --- a/electron/index.js +++ b/electron/index.js @@ -2,6 +2,10 @@ var app = require('app'); var Menu = require('menu'); var BrowserWindow = require('browser-window'); +app.on('window-all-closed', function() { + app.quit(); +}); + app.on('ready', function() { var mainWindow = new BrowserWindow({ center: true, diff --git a/localhost.js b/localhost.js index c2f0c92..c58278e 100644 --- a/localhost.js +++ b/localhost.js @@ -7,6 +7,10 @@ var app = require('app'); var Menu = require('menu'); var BrowserWindow = require('browser-window'); +app.on('window-all-closed', function() { + app.quit(); +}); + app.on('ready', function() { var mainWindow = new BrowserWindow({ center: true,