summaryrefslogtreecommitdiffstats
path: root/dom/tests/mochitest/whatwg/postMessage_throw_helper.html
blob: b1d3ddce7d7e70fdb81349f3cff8bce0b541cf0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE html>
<html>
<head>
  <title>postMessage throwing page</title>
  <script type="application/javascript">
    function receiveMessage(evt)
    {
      throw 17;
    }
    window.addEventListener("message", receiveMessage);

    function setup()
    {
      var target = document.getElementById("location");
      target.textContent = location.hostname + ":" + (location.port || 80);
    }

    window.addEventListener("load", setup);
  </script>
</head>
<body>
<h1 id="location">No location!</h1>
</body>
</html>