electron/docs/fiddles/windows/manage-windows/create-frameless-window/main.js
Kristof Kalocsai 821bcdef75 docs: added windows -> create frameless window example (#20591)
* docs: added windows -> create frameless window example from electron-api-docs

* fixed style in accord with StandardJS

* removed class tag from button
2019-11-13 14:49:13 +09:00

25 lines
455 B
JavaScript

const { app, BrowserWindow } = require('electron')
let mainWindow = null
function createWindow () {
const windowOptions = {
width: 600,
height: 400,
title: 'Create a frameless window',
webPreferences: {
nodeIntegration: true
}
}
mainWindow = new BrowserWindow(windowOptions)
mainWindow.loadFile('index.html')
mainWindow.on('closed', () => {
mainWindow = null
})
}
app.on('ready', () => {
createWindow()
})