summaryrefslogtreecommitdiffstats
path: root/dom/workers/test/file_use_counter_service_worker.js
blob: 8ee0d2e04a64ae095194791735032572b82e950f (plain)
1
2
3
4
5
6
7
8
9
onmessage = async function (e) {
  if (e.data === "RUN") {
    console.log("worker runs");
    await clients.claim();
    clients.matchAll().then(res => {
      res.forEach(client => client.postMessage("DONE"));
    });
  }
};