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
This commit is contained in:
Kristof Kalocsai 2019-11-13 06:49:13 +01:00 committed by Cheng Zhao
parent a15e0e0657
commit 821bcdef75
3 changed files with 63 additions and 0 deletions

View file

@ -0,0 +1,25 @@
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()
})