electron/spec/fixtures/pages/window-open-postMessage.html
Samuel Attard abe5cf398c
refactor: port window.open and window.opener to use ctx bridge instead of hole punching (#23235)
* refactor: port window.open and window.opener to use ctx bridge instead of hole punching

* refactor: only run the isolated init bundle when webview is enabled
2020-04-27 12:46:04 -07:00

14 lines
374 B
HTML

<html>
<body>
<script type="text/javascript" charset="utf-8">
window.addEventListener('message', function (e) {
window.opener.postMessage(JSON.stringify({
origin: e.origin,
data: e.data,
sourceEqualsOpener: e.source.location.href === window.opener.location.href
}), '*');
});
window.opener.postMessage("ready", "*")
</script>
</body>
</html>