electron/docs/fiddles/system/system-information/get-version-information/main.js
Milan Burda b14b876d50
docs: fix fiddles (#39060)
* refactor: replace Array.prototype.forEach.call with plain for-of

* fix: add missing contextIsolation: false

* fix: open links in default browser
2023-07-13 10:10:37 +02:00

26 lines
489 B
JavaScript

const { app, BrowserWindow } = require('electron')
let mainWindow = null
function createWindow () {
const windowOptions = {
width: 600,
height: 400,
title: 'Get version information',
webPreferences: {
contextIsolation: false,
nodeIntegration: true
}
}
mainWindow = new BrowserWindow(windowOptions)
mainWindow.loadFile('index.html')
mainWindow.on('closed', () => {
mainWindow = null
})
}
app.whenReady().then(() => {
createWindow()
})