en.javascript.info/3-frames-and-windows/03-cross-window-communication/postmessage.view/iframe.html
2019-04-02 14:01:44 +03:00

18 lines
258 B
HTML

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
Receiving iframe.
<script>
window.addEventListener('message', function(event) {
alert(`Received ${event.data} from ${event.origin}`);
});
</script>
</body>
</html>