mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
23 lines
484 B
JavaScript
23 lines
484 B
JavaScript
const { app, BrowserWindow, ipcMain } = require('electron')
|
|
|
|
ipcMain.on('create-frameless-window', (event, { url }) => {
|
|
const win = new BrowserWindow({ frame: false })
|
|
win.loadURL(url)
|
|
})
|
|
|
|
function createWindow () {
|
|
const mainWindow = new BrowserWindow({
|
|
width: 600,
|
|
height: 400,
|
|
title: 'Create a frameless window',
|
|
webPreferences: {
|
|
nodeIntegration: true
|
|
}
|
|
})
|
|
mainWindow.loadFile('index.html')
|
|
}
|
|
|
|
app.whenReady().then(() => {
|
|
createWindow()
|
|
})
|