Only assign opener when not using nativeWindowOpen
This commit is contained in:
parent
25e1ed97b5
commit
553021bc9c
1 changed files with 4 additions and 4 deletions
|
@ -127,6 +127,10 @@ module.exports = (ipcRenderer, guestInstanceId, openerId, hiddenPage, usesNative
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (openerId != null) {
|
||||||
|
window.opener = getOrCreateProxy(ipcRenderer, openerId)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window.alert = function (message, title) {
|
window.alert = function (message, title) {
|
||||||
|
@ -142,10 +146,6 @@ module.exports = (ipcRenderer, guestInstanceId, openerId, hiddenPage, usesNative
|
||||||
throw new Error('prompt() is and will not be supported.')
|
throw new Error('prompt() is and will not be supported.')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (openerId != null) {
|
|
||||||
window.opener = getOrCreateProxy(ipcRenderer, openerId)
|
|
||||||
}
|
|
||||||
|
|
||||||
ipcRenderer.on('ELECTRON_GUEST_WINDOW_POSTMESSAGE', function (event, sourceId, message, sourceOrigin) {
|
ipcRenderer.on('ELECTRON_GUEST_WINDOW_POSTMESSAGE', function (event, sourceId, message, sourceOrigin) {
|
||||||
// Manually dispatch event instead of using postMessage because we also need to
|
// Manually dispatch event instead of using postMessage because we also need to
|
||||||
// set event.source.
|
// set event.source.
|
||||||
|
|
Loading…
Reference in a new issue