tor-browser

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

simple.html (761B)


      1 <!-- Any copyright is dedicated to the Public Domain.
      2     http://creativecommons.org/publicdomain/zero/1.0/ -->
      3 <!DOCTYPE HTML>
      4 <html>
      5 <head>
      6  <meta charset="UTF-8">
      7  <title>Service worker test</title>
      8 </head>
      9 <body>
     10 <script type="text/javascript">
     11 "use strict";
     12 
     13 let registration;
     14 
     15 const registerServiceWorker = async function() {
     16  try {
     17    registration = await navigator.serviceWorker.register("empty-sw.js");
     18    dump("Empty service worker registered\n");
     19  } catch (e) {
     20    dump("Empty service worker not registered: " + e + "\n");
     21  }
     22 };
     23 
     24 // Helper called from head.js to unregister the service worker.
     25 window.getRegistration = function() {
     26  return registration;
     27 };
     28 // Register the service worker.
     29 registerServiceWorker();
     30 </script>
     31 </body>
     32 </html>