@lvce-editor/main-process 6.37.16 → 6.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mainProcessMain.js +7 -3
- package/package.json +1 -1
package/dist/mainProcessMain.js
CHANGED
|
@@ -7004,7 +7004,7 @@ const attachEventListenersToWebContents = (webContentsId, webContents, browserWi
|
|
|
7004
7004
|
const wrappedListener = (...args) => {
|
|
7005
7005
|
// @ts-ignore
|
|
7006
7006
|
const createWindow = (options, url, disposition) => {
|
|
7007
|
-
const view = createWebContentsViewForWindow(browserWindow, options
|
|
7007
|
+
const view = createWebContentsViewForWindow(browserWindow, options);
|
|
7008
7008
|
send('ElectronWebContents.handleWindowOpen', webContentsId, view.webContents.id, url, disposition);
|
|
7009
7009
|
return view.webContents;
|
|
7010
7010
|
};
|
|
@@ -7019,10 +7019,14 @@ const attachEventListenersToWebContents = (webContentsId, webContents, browserWi
|
|
|
7019
7019
|
}
|
|
7020
7020
|
webContentsWithEventListeners.add(webContents);
|
|
7021
7021
|
};
|
|
7022
|
-
const createWebContentsViewForWindow = (browserWindow,
|
|
7022
|
+
const createWebContentsViewForWindow = (browserWindow, options = {}) => {
|
|
7023
7023
|
const view = new WebContentsView({
|
|
7024
|
+
// Electron's popup contents carry the opener relationship and pending navigation.
|
|
7025
|
+
...(options.webContents && {
|
|
7026
|
+
webContents: options.webContents
|
|
7027
|
+
}),
|
|
7024
7028
|
webPreferences: {
|
|
7025
|
-
...webPreferences,
|
|
7029
|
+
...options.webPreferences,
|
|
7026
7030
|
session: getSession()
|
|
7027
7031
|
}
|
|
7028
7032
|
});
|