1
0
Fork 0
firefox/toolkit/components/antitracking/test/browser/matchAll.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

16 lines
326 B
JavaScript

self.addEventListener("message", async e => {
let clients = await self.clients.matchAll({
type: "window",
includeUncontrolled: true,
});
let hasWindow = false;
for (let client of clients) {
if (e.data == client.url) {
hasWindow = true;
break;
}
}
e.source.postMessage(hasWindow);
});