electron/spec/fixtures/pages/window-open-postMessage.html

15 lines
374 B
HTML
Raw Normal View History

2015-12-11 00:49:23 +00:00
<html>
<body>
<script type="text/javascript" charset="utf-8">
window.addEventListener('message', function (e) {
2015-12-15 01:09:31 +00:00
window.opener.postMessage(JSON.stringify({
origin: e.origin,
data: e.data,
sourceEqualsOpener: e.source.location.href === window.opener.location.href
2015-12-15 01:09:31 +00:00
}), '*');
2015-12-11 00:49:23 +00:00
});
window.opener.postMessage("ready", "*")
2015-12-11 00:49:23 +00:00
</script>
</body>
</html>