mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
Update web-platform-tests to revision 8a14626934f5748a4ea6210847a02c0d8bbc8560
This commit is contained in:
parent
defc176333
commit
4851e4e2b9
133 changed files with 3076 additions and 304 deletions
|
@ -0,0 +1,14 @@
|
|||
async function broadcast(msg) {
|
||||
for (const client of await clients.matchAll()) {
|
||||
client.postMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
self.addEventListener('fetch', event => {
|
||||
event.waitUntil(broadcast(event.request.url));
|
||||
event.respondWith(fetch(event.request));
|
||||
});
|
||||
|
||||
self.addEventListener('activate', event => {
|
||||
self.clients.claim();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue