tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

notificationclick_focus.html (666B)


      1 <!--
      2  Any copyright is dedicated to the Public Domain.
      3  http://creativecommons.org/publicdomain/zero/1.0/
      4 -->
      5 <!DOCTYPE HTML>
      6 <html>
      7 <head>
      8  <title>Bug 1144660 - controlled page</title>
      9 <script class="testbody" type="text/javascript">
     10  var testWindow = parent;
     11  if (opener) {
     12    testWindow = opener;
     13  }
     14 
     15  navigator.serviceWorker.ready.then(function(swr) {
     16    swr.showNotification("Hi there. The ServiceWorker should receive a click event for this.");
     17  });
     18 
     19  navigator.serviceWorker.onmessage = function(msg) {
     20    dump("GOT Message " + JSON.stringify(msg.data) + "\n");
     21    testWindow.callback(msg.data.ok);
     22  };
     23 </script>
     24 
     25 </head>
     26 <body>
     27 </body>
     28 </html>