mirror of
https://github.com/electron/electron.git
synced 2026-02-15 17:45:33 -05:00
Sets correct openerId in mergeBrowserWindowOptions() to give correct options to 'new-window' event handler
This commit is contained in:
@@ -40,6 +40,9 @@ const mergeBrowserWindowOptions = function (embedder, options) {
|
||||
options.webPreferences.nodeIntegration = false
|
||||
}
|
||||
|
||||
// Sets correct openerId here to give correct options to 'new-window' event handler
|
||||
options.webPreferences.openerId = embedder.id
|
||||
|
||||
return options
|
||||
}
|
||||
|
||||
@@ -93,7 +96,7 @@ const createGuest = function (embedder, url, frameName, options) {
|
||||
if (options.webPreferences == null) {
|
||||
options.webPreferences = {}
|
||||
}
|
||||
options.webPreferences.openerId = embedder.id
|
||||
|
||||
guest = new BrowserWindow(options)
|
||||
if (!options.webContents || url !== 'about:blank') {
|
||||
// We should not call `loadURL` if the window was constructed from an
|
||||
|
||||
Reference in New Issue
Block a user