https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 3fee9e181e7c97c517c0b36b6387c04e74a02181 authored by Andy Paicu on 02 October 2018, 04:21:46 UTC
Fixed securityviolationevent not containing the full src and path
Tip revision: 3fee9e1
serviceworker.js
self.addEventListener('install', () => {
    // activate this service worker immediately
    self.skipWaiting();
});

self.addEventListener('activate', event => {
    // let this service worker control window clients immediately
    event.waitUntil(self.clients.claim());
});

self.addEventListener('message', event => {
    event.waitUntil(clients.matchAll().then(windows => {
        event.ports[0].postMessage(windows.map(w => { return w.url; }).sort());
    }));
});
back to top