blob: 1a6582ce60fbddf2e235fc9534babe21fa4e23d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
<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>
|