summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/dom/events/EventListener-incumbent-global-subframe-2.sub.html
blob: 9c7235e2ad435885c9bff4c18eb7c6e2d9d77529 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
<!DOCTYPE html>
<iframe src="{{location[scheme]}}://{{domains[www2]}}:{{ports[http][0]}}{{location[path]}}/../EventListener-incumbent-global-subsubframe.sub.html"></iframe>
<script>
  document.domain = "{{host}}";
  onmessage = function(e) {
    if (e.data == "start") {
      frames[0].document.body.addEventListener("click", frames[0].getTheListener());
      frames[0].postMessage("sendclick", "*");
    } else {
      parent.postMessage(e.data, "*");
    }
  }
</script>