gecko/addon-sdk/source/data/test-iframe-postmessage.html

21 lines
376 B
HTML

<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<script>
window.addEventListener("message", function(msg) {
parent.postMessage(msg.data, "*");
});
parent.postMessage({
first: "a string",
second: ["an", "array"],
third: {an: 'object'}
}, '*');
</script>
</head>
<body>
<h1>Inner iframe</h1>
</body>
</html>