mirror of https://github.com/electron/electron
17 lines
384 B
JavaScript
17 lines
384 B
JavaScript
const { app, BrowserWindow } = require('electron')
|
|
|
|
function createWindow () {
|
|
const win = new BrowserWindow({
|
|
// remove the default titlebar
|
|
titleBarStyle: 'hidden',
|
|
// expose window controlls in Windows/Linux
|
|
...(process.platform !== 'darwin' ? { titleBarOverlay: true } : {})
|
|
})
|
|
|
|
win.loadFile('index.html')
|
|
}
|
|
|
|
app.whenReady().then(() => {
|
|
createWindow()
|
|
})
|