<style>
body {
height: 500px;
width: 500px;
margin: 0;
}
.box {
display: inline-block;
width: 5px;
height: 5px;
}
</style>
<body>
</body>
<script>
var eventTypes = ['mousemove', 'mousedown', 'mouseup', 'click'];
for (var i = 0; i < eventTypes.length; i++)
document.addEventListener(eventTypes[i], parent.onEventInFrame);
// Fill the viewport with boxes for verifying the target of hit testing.
for (var i = 0; i < 100*100; i++) {
var div = document.createElement("div");
div.className = "box";
document.body.appendChild(div);
}
</script>