]> khamidou — GitHub mirrors - electron.git/commitdiff
Improve spec window's default behavior.
authorCheng Zhao <zcbenz@gmail.com>
Fri, 19 Jul 2013 02:47:00 +0000 (10:47 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 19 Jul 2013 02:47:00 +0000 (10:47 +0800)
spec/main.js

index 41c2945f6843eb40b81c440eb6399d2d5c5feda3..b3b4b4dac0e879bdd4dcc58fba049b139f265511 100644 (file)
@@ -3,6 +3,14 @@ var BrowserWindow = require('browser-window');
 
 var window = null;
 
+process.on('uncaughtException', function() {
+  window.openDevTools();
+});
+
+app.on('window-all-closed', function() {
+  app.terminate();
+});
+
 app.on('finish-launching', function() {
   window = new BrowserWindow({
     title: 'atom-shell tests',