import { app, BrowserWindow } from "electron"; const smoke = process.argv.includes("--smoke") || process.env.DEMO_SMOKE === "1"; const events: string[] = []; app.on("before-quit", () => events.push("before-quit")); app.on("will-quit", () => events.push("will-quit")); app.whenReady().then(async () => { events.push("ready"); const window = new BrowserWindow({ width: 640, height: 420, show: false, webPreferences: { contextIsolation: true, sandbox: true, nodeIntegration: false, }, }); window.on("focus", () => events.push("focus")); window.on("closed", () => events.push("window-closed")); window.once("ready-to-show", () => window.show()); await window.loadURL("data:text/html,