2008-02-26 19:48:54 -08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
<head>
|
|
|
|
<title>postMessage closed page</title>
|
|
|
|
<script type="application/javascript">
|
|
|
|
function receiveMessage(evt)
|
|
|
|
{
|
2008-05-02 12:26:47 -07:00
|
|
|
evt.source.postMessage("FAIL", "*");
|
2008-02-26 19:48:54 -08:00
|
|
|
}
|
|
|
|
|
2008-05-02 12:26:47 -07:00
|
|
|
window.addEventListener("message", receiveMessage, false);
|
2008-02-26 19:48:54 -08:00
|
|
|
|
|
|
|
function setup()
|
|
|
|
{
|
|
|
|
var query = location.search.substring(1);
|
|
|
|
|
|
|
|
if (query == "opener")
|
2010-03-12 13:53:36 -08:00
|
|
|
window.opener.postMessage("message", "http://mochi.test:8888");
|
2008-02-26 19:48:54 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
window.addEventListener("load", setup, false);
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
</body>
|
|
|
|
</html>
|