Sets correct openerId in mergeBrowserWindowOptions() to give correct options to 'new-window' event handler
This commit is contained in:
parent
cc7f4fedf6
commit
a2b3cf95a7
1 changed files with 4 additions and 1 deletions
|
@ -40,6 +40,9 @@ const mergeBrowserWindowOptions = function (embedder, options) {
|
||||||
options.webPreferences.nodeIntegration = false
|
options.webPreferences.nodeIntegration = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sets correct openerId here to give correct options to 'new-window' event handler
|
||||||
|
options.webPreferences.openerId = embedder.id
|
||||||
|
|
||||||
return options
|
return options
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +96,7 @@ const createGuest = function (embedder, url, frameName, options) {
|
||||||
if (options.webPreferences == null) {
|
if (options.webPreferences == null) {
|
||||||
options.webPreferences = {}
|
options.webPreferences = {}
|
||||||
}
|
}
|
||||||
options.webPreferences.openerId = embedder.id
|
|
||||||
guest = new BrowserWindow(options)
|
guest = new BrowserWindow(options)
|
||||||
if (!options.webContents || url !== 'about:blank') {
|
if (!options.webContents || url !== 'about:blank') {
|
||||||
// We should not call `loadURL` if the window was constructed from an
|
// We should not call `loadURL` if the window was constructed from an
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue