electron/atom/browser/default_app/default_app.js
2015-11-11 10:37:34 +08:00

20 lines
438 B
JavaScript

var app = require('app');
var BrowserWindow = require('browser-window');
var mainWindow = null;
// Quit when all windows are closed.
app.on('window-all-closed', function() {
app.quit();
});
app.on('ready', function() {
mainWindow = new BrowserWindow({
width: 800,
height: 600,
autoHideMenuBar: true,
useContentSize: true,
});
mainWindow.loadUrl('file://' + __dirname + '/index.html');
mainWindow.focus();
});