mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
fixup dont destroy webcontents for now
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user