summaryrefslogtreecommitdiffstats
path: root/dom/events/test/file_event_screenXY.html
blob: f8b3c361a797aa0a8264444e315b8210bdb60fcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!DOCTYPE html>
<style>
html, body {
  height: 100%;
  margin: 0px;
  padding: 0px;
}
</style>
<div style="width:100%;height:100%;background-color:red;"></div>
<script>
  document.querySelector("div").addEventListener("click", event => {
    parent.postMessage({ screenX: event.screenX,
                         screenY: event.screenY,
                         clientX: event.clientX,
                         clientY: event.clientY }, "*");
  });
  window.onload = () => {
    parent.postMessage("ready", "*");
  }
</script>