electron/default_app/default_app.js

23 lines
450 B
JavaScript
Raw Normal View History

const {app, BrowserWindow} = require('electron')
var mainWindow = null
// Quit when all windows are closed.
app.on('window-all-closed', () => {
app.quit()
})
exports.load = (appUrl) => {
app.on('ready', () => {
mainWindow = new BrowserWindow({
width: 800,
height: 600,
autoHideMenuBar: true,
2016-04-26 16:25:46 +00:00
backgroundColor: '#FFFFFF',
2016-03-27 17:38:32 +00:00
useContentSize: true
})
mainWindow.loadURL(appUrl)
mainWindow.focus()
})
}