file_use_counter_service_worker.js (227B)
1 onmessage = async function (e) { 2 if (e.data === "RUN") { 3 console.log("worker runs"); 4 await clients.claim(); 5 clients.matchAll().then(res => { 6 res.forEach(client => client.postMessage("DONE")); 7 }); 8 } 9 };