Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (27 sloc) 0.624 kb
<!DOCTYPE html>
<title>postMessage target</title>
body {
font: normal 16px/20px Helvetica, sans-serif;
margin: 0;
padding: 20px;
<strong>This iframe is located on the same domain</strong>
<p id="test">Send me a message!</p>
<script src="/js/h5utils.js"></script>
addEvent(window, "message", function(e){
if ( e.origin !== "" ) {
document.getElementById("test").innerHTML = 'Ignoring message from ' + e.origin;
} else {
document.getElementById("test").innerHTML = e.origin + " said: " +;
Jump to Line
Something went wrong with that request. Please try again.