Source code

Revision control

Copy as Markdown

Other Tools

<style>
body, html { margin: 0; }
</style>
<div id="thediv" style="position: absolute; top: 0; left: 0; width: 40px; height: 40px; background: blue;">
</div>
<div style="width:10px; height: 500vh;"></div>
<script>
let target = document.getElementById("thediv");
target.addEventListener("click", listener);
function listener() {
parent.postMessage("gotclick", "*");
}
</script>