const { app, BrowserWindow } = require('electron'); app.whenReady().then(() => { const w = new BrowserWindow({ show: false, webPreferences: { webviewTag: true } }); w.loadURL('data:text/html,'); app.on('web-contents-created', () => { w.close(); }); });