mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
17 lines
381 B
JavaScript
17 lines
381 B
JavaScript
const { app, BrowserWindow } = require('electron');
|
|
|
|
app.once('ready', () => {
|
|
const w = new BrowserWindow({
|
|
show: false,
|
|
webPreferences: {
|
|
contextIsolation: false,
|
|
nodeIntegration: true
|
|
}
|
|
});
|
|
w.webContents.once('crashed', () => {
|
|
app.quit();
|
|
});
|
|
w.webContents.loadURL('about:blank');
|
|
w.webContents.executeJavaScript('process.crash()');
|
|
});
|