1
0
Fork 0
firefox/dom/serviceworkers/test/fetch/plugin/worker.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

15 lines
403 B
JavaScript

self.addEventListener("fetch", function (event) {
var resource = event.request.url.split("/").pop();
event.waitUntil(
clients.matchAll().then(clients => {
clients.forEach(client => {
if (client.url.includes("plugins.html")) {
client.postMessage({
destination: event.request.destination,
resource,
});
}
});
})
);
});