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

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script type="text/javascript">
const code = `
var webview = document.createElement('webview')
webview.src = 'about:blank'
webview.addEventListener('did-finish-load', () => {
ipcRenderer.send('webview-loaded')
}, {once: true})
document.body.appendChild(webview)
`
open('about:blank').eval(code)
</script>
</body>
</html>