Inline JSON message response
This commit is contained in:
parent
d1989b3624
commit
aa9c7662a3
1 changed files with 2 additions and 3 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue