tor-browser

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

worker_updatefoundevent.js (553B)


      1 /**
      2 * Any copyright is dedicated to the Public Domain.
      3 * http://creativecommons.org/publicdomain/zero/1.0/
      4 */
      5 
      6 registration.onupdatefound = function (e) {
      7  clients.matchAll().then(function (clients) {
      8    if (!clients.length) {
      9      // We don't control any clients when the first update event is fired
     10      // because we haven't reached the 'activated' state.
     11      return;
     12    }
     13 
     14    if (registration.scope.match(/updatefoundevent\.html$/)) {
     15      clients[0].postMessage("finish");
     16    } else {
     17      dump("Scope did not match");
     18    }
     19  });
     20 };