Change webContents -> options.webContents
This commit is contained in:
parent
87565f4c84
commit
de2019f6b8
1 changed files with 1 additions and 2 deletions
|
@ -242,12 +242,11 @@ ipcMain.on('ELECTRON_GUEST_WINDOW_MANAGER_INTERNAL_WINDOW_OPEN', function (event
|
|||
disposition, options,
|
||||
additionalFeatures, postData) {
|
||||
options = mergeBrowserWindowOptions(event.sender, options)
|
||||
const {webContents} = options
|
||||
event.sender.emit('new-window', event, url, frameName, disposition, options, additionalFeatures)
|
||||
const newGuest = event.newGuest
|
||||
if ((event.sender.isGuest() && !event.sender.allowPopups) || event.defaultPrevented) {
|
||||
if (newGuest !== undefined && newGuest !== null) {
|
||||
if (webContents === newGuest.webContents) {
|
||||
if (options.webContents === newGuest.webContents) {
|
||||
event.defaultPrevented = false
|
||||
}
|
||||
event.returnValue = setupGuest(event.sender, frameName, newGuest, options)
|
||||
|
|
Loading…
Reference in a new issue