electron/spec-main/fixtures/crash-cases/setimmediate-renderer-crash/index.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
483 B
JavaScript
Raw Normal View History

const { app, BrowserWindow } = require('electron');
const path = require('path');
app.whenReady().then(() => {
const win = new BrowserWindow({
show: false,
webPreferences: {
nodeIntegration: true,
preload: path.resolve(__dirname, 'preload.js')
}
});
win.loadURL('about:blank');
win.webContents.on('render-process-gone', () => {
process.exit(1);
});
win.webContents.on('did-finish-load', () => {
setTimeout(() => app.quit());
});
});