summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/XMLHttpRequest/xmlhttprequest-sync-not-hang-scriptloader-subframe.html
blob: aeff2af97c8a3d415c95115c728d0464c4ca04c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!DOCTYPE html>
<script>
  function secondScriptRan() {
    parent.postMessage("done", "*");
  }

  function createSecondScript() {
      var script = document.createElement("script");
      script.src = "data:application/javascript,secondScriptRan()";
      document.head.appendChild(script);

      var xhr = new XMLHttpRequest();
      xhr.open("GET", "data:,", false);
      xhr.send();
  }
</script>
<script src="data:application/javascript,createSecondScript()" defer></script>