electron/spec-main/fixtures/crash-cases/setimmediate-window-open-crash/index.js
Jeremy Rose d44a187d0b
feat: remove nativeWindowOpen option (#29405)
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
Co-authored-by: Milan Burda <milan.burda@gmail.com>
2022-01-06 09:28:03 -08:00

20 lines
362 B
JavaScript

const { app, BrowserWindow } = require('electron');
function createWindow () {
const mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: true,
contextIsolation: false
}
});
mainWindow.on('close', () => {
app.quit();
});
mainWindow.loadFile('index.html');
}
app.whenReady().then(() => {
createWindow();
});