electron/spec/fixtures/pages/webview-opener-postMessage.html
2016-06-09 12:02:01 -07:00

19 lines
430 B
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script>
var windowUrl = decodeURIComponent(window.location.search.substring(3))
var opened = window.open(windowUrl, '', 'show=no')
window.addEventListener('message', function (event) {
try {
opened.close()
} finally {
console.log(event.data)
}
})
</script>
</head>
<body>
</body>
</html>