Inline JSON message response

This commit is contained in:
Kevin Sawicki 2015-12-14 17:09:31 -08:00
parent d1989b3624
commit aa9c7662a3

View file

@ -2,13 +2,12 @@
<body>
<script type="text/javascript" charset="utf-8">
window.addEventListener('message', function (e) {
var reply = JSON.stringify({
window.opener.postMessage(JSON.stringify({
origin: e.origin,
data: e.data,
sourceEqualsOpener: e.source === window.opener,
sourceId: e.source.guestId
})
window.opener.postMessage(reply, '*');
}), '*');
});
</script>
</body>