Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<head>
<title>postMessage closed page</title>
<script type="application/javascript">
function receiveMessage(evt)
{
evt.source.postMessage("FAIL", "*");
}
window.addEventListener("message", receiveMessage);
function setup()
{
var query = location.search.substring(1);
if (query == "opener")
window.opener.postMessage("message", "http://mochi.test:8888");
}
window.addEventListener("load", setup);
</script>
</head>
<body>
</body>
</html>