|
1 <!DOCTYPE html> |
|
2 <html xmlns="http://www.w3.org/1999/xhtml"> |
|
3 <head> |
|
4 <title>postMessage closed page</title> |
|
5 <script type="application/javascript"> |
|
6 function receiveMessage(evt) |
|
7 { |
|
8 evt.source.postMessage("FAIL", "*"); |
|
9 } |
|
10 |
|
11 window.addEventListener("message", receiveMessage, false); |
|
12 |
|
13 function setup() |
|
14 { |
|
15 var query = location.search.substring(1); |
|
16 |
|
17 if (query == "opener") |
|
18 window.opener.postMessage("message", "http://mochi.test:8888"); |
|
19 } |
|
20 |
|
21 window.addEventListener("load", setup, false); |
|
22 </script> |
|
23 </head> |
|
24 <body> |
|
25 </body> |
|
26 </html> |