fix: <webview> not working in scriptable popups (#19198)

This commit is contained in:
Milan Burda 2019-07-12 03:56:04 +02:00 committed by Shelley Vohr
parent e26f366405
commit 35294891ae
5 changed files with 53 additions and 3 deletions

View file

@ -231,6 +231,12 @@ ipcMain.on('prevent-next-new-window', (event, id) => {
webContents.fromId(id).once('new-window', event => event.preventDefault())
})
ipcMain.on('set-options-on-next-new-window', (event, id, key, value) => {
webContents.fromId(id).once('new-window', (event, url, frameName, disposition, options) => {
options[key] = value
})
})
ipcMain.on('set-web-preferences-on-next-new-window', (event, id, key, value) => {
webContents.fromId(id).once('new-window', (event, url, frameName, disposition, options) => {
options.webPreferences[key] = value