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