dom/tests/mochitest/whatwg/postMessage_throw_helper.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 <!DOCTYPE html>
     2 <html>
     3 <head>
     4   <title>postMessage throwing page</title>
     5   <script type="application/javascript">
     6     function receiveMessage(evt)
     7     {
     8       throw 17;
     9     }
    10     window.addEventListener("message", receiveMessage, false);
    12     function setup()
    13     {
    14       var target = document.getElementById("location");
    15       target.textContent = location.hostname + ":" + (location.port || 80);
    16     }
    18     window.addEventListener("load", setup, false);
    19   </script>
    20 </head>
    21 <body>
    22 <h1 id="location">No location!</h1>
    23 </body>
    24 </html>

mercurial