electron/spec-main/fixtures/apps/quit/main.js

10 lines
330 B
JavaScript

const { app, BrowserWindow } = require('electron');
app.once('ready', () => {
const w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true } });
w.webContents.once('crashed', () => {
app.quit();
});
w.webContents.loadURL('about:blank');
w.webContents.executeJavaScript('process.crash()');
});