Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 27 lines (27 sloc) 0.624 kB
ed0bded @remy Loading existing examples from html5demos.com
authored
1 <!DOCTYPE html>
6c237bb @remy Tweaked postMessage examples to use getElements rather than querySele…
authored
2 <html>
3 <head>
ad614ee @remy Complete reorganisation of the directory so that making new demos app…
authored
4 <title>postMessage target</title>
ed0bded @remy Loading existing examples from html5demos.com
authored
5 <style>
6 body {
7 font: normal 16px/20px Helvetica, sans-serif;
8 margin: 0;
9 padding: 20px;
10 }
11 </style>
6c237bb @remy Tweaked postMessage examples to use getElements rather than querySele…
authored
12 </head>
13 <body>
ed0bded @remy Loading existing examples from html5demos.com
authored
14 <strong>This iframe is located on the same domain</strong>
15 <p id="test">Send me a message!</p>
ad614ee @remy Complete reorganisation of the directory so that making new demos app…
authored
16 <script src="/js/h5utils.js"></script>
ed0bded @remy Loading existing examples from html5demos.com
authored
17 <script>
18 addEvent(window, "message", function(e){
19 if ( e.origin !== "http://html5demos.com" ) {
20 document.getElementById("test").innerHTML = 'Ignoring message from ' + e.origin;
21 } else {
22 document.getElementById("test").innerHTML = e.origin + " said: " + e.data;
23 }
24 });
6c237bb @remy Tweaked postMessage examples to use getElements rather than querySele…
authored
25 </script>
26 </body>
27 </html>
Something went wrong with that request. Please try again.