summaryrefslogtreecommitdiffstats
path: root/dom/workers/test/file_use_counter_service_worker.js
diff options
context:
space:
mode:
Diffstat (limited to 'dom/workers/test/file_use_counter_service_worker.js')
-rw-r--r--dom/workers/test/file_use_counter_service_worker.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/dom/workers/test/file_use_counter_service_worker.js b/dom/workers/test/file_use_counter_service_worker.js
new file mode 100644
index 0000000000..8ee0d2e04a
--- /dev/null
+++ b/dom/workers/test/file_use_counter_service_worker.js
@@ -0,0 +1,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"));
+ });
+ }
+};