electron/atom/browser/default_app/default_app.js
2015-11-13 16:03:40 +08:00

21 lines
475 B
JavaScript

const electron = require('electron');
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
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();
});