🐛 修复销毁 BrowserView 的bug

This commit is contained in:
muwoo
2023-11-01 15:30:08 +08:00
parent 3f7285b177
commit 9663232864
29 changed files with 17 additions and 9479 deletions

View File

@@ -54,6 +54,7 @@ export default () => {
executeHooks('PluginOut', null);
});
createWin.on('closed', () => {
view.webContents?.destroy();
win = undefined;
});
createWin.on('focus', () => {
@@ -70,6 +71,7 @@ export default () => {
);
view.setAutoResize({ width: true, height: true });
createWin.setBrowserView(view);
view.inDetach = true;
createWin.webContents.executeJavaScript(
`window.initDetach(${JSON.stringify(pluginInfo)})`
);