tor-browser

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

unresolved_fetch_worker.js (501B)


      1 var keepPromiseAlive;
      2 onfetch = function (event) {
      3  event.waitUntil(
      4    clients.matchAll().then(clients => {
      5      clients.forEach(client => {
      6        client.postMessage("continue");
      7      });
      8    })
      9  );
     10 
     11  // Never resolve, and keep it alive on our global so it can't get GC'ed and
     12  // make this test weird and intermittent.
     13  event.respondWith((keepPromiseAlive = new Promise(function (res, rej) {})));
     14 };
     15 
     16 addEventListener("activate", function (event) {
     17  event.waitUntil(clients.claim());
     18 });