mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 22:55:23 +00:00
12001268c0
--HG-- extra : rebase_source : 5b8a2a9b261c53f0ff5a860e1dc2e7ede711105f
23 lines
541 B
HTML
23 lines
541 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<body>
|
|
<script type="application/javascript">
|
|
|
|
function ok(a, msg) {
|
|
window.parent.postMessage({ status: a ? "OK" : "KO", message: msg }, "*");
|
|
}
|
|
|
|
window.addEventListener('message', receiveMessage, false);
|
|
function receiveMessage(evt) {
|
|
ok (evt.data, "Data received");
|
|
ok (evt.data.port instanceof MessagePort, "Data contains a MessagePort");
|
|
|
|
var a = new MessageChannel();
|
|
window.parent.postMessage({ status: "FINISH", port: a.port2 }, '*', [a.port2]);
|
|
}
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|