Return null from native window.open when allowpopups is unset
This commit is contained in:
parent
a0571e3c72
commit
dbd240a7cb
5 changed files with 32 additions and 2 deletions
|
@ -225,6 +225,10 @@ const attachGuest = function (event, elementInstanceId, guestInstanceId, params)
|
|||
webPreferences.preloadURL = params.preload
|
||||
}
|
||||
|
||||
if (webPreferences.nativeWindowOpen === true && !params.allowpopups) {
|
||||
webPreferences.disablePopups = true
|
||||
}
|
||||
|
||||
embedder.emit('will-attach-webview', event, webPreferences, params)
|
||||
if (event.defaultPrevented) {
|
||||
if (guest.viewInstanceId == null) guest.viewInstanceId = params.instanceId
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue