/* eslint-disable @typescript-eslint/no-require-imports */ // 真实报错复现:窗口 destroy 之后继续访问 webContents。 // 运行:pnpm exec electron diagnostics/destroyed-window.cjs const { app, BrowserWindow } = require("electron"); app.whenReady().then(async () => { const win = new BrowserWindow({ show: false, webPreferences: { contextIsolation: true, sandbox: true }, }); await win.loadURL("data:text/html,