fixup dont destroy webcontents for now

This commit is contained in:
John Kleinschmidt
2024-11-23 16:54:32 -05:00
parent 765b939dc3
commit e292b64fa0

View File

@@ -60,11 +60,14 @@ export async function closeAllWindows (assertNotWindows = false) {
export async function cleanupWebContents () {
let webContentsDestroyed = 0;
const existingWCS = webContents.getAllWebContents();
webContentsDestroyed = existingWCS.length;
/*
for (const contents of existingWCS) {
/*const isDestroyed = once(contents, 'destroyed');
const isDestroyed = once(contents, 'destroyed');
contents.destroy();
await isDestroyed;*/
await isDestroyed;
webContentsDestroyed++;
}
*/
return webContentsDestroyed;
}