How can I retrieve the URL of pages where ServiceWorker is registered within its scope?
script.js
console.log(window.location.pathname); // /content
navigator.serviceWorker.register('/app/service-worker.js',{scope : '/content'}).then(function(){
console.log('Service Worker activated');
}).catch(function(error){
console.log(error.message);
});
service-worker.js
console.log(self.location.pathname); // /sw.js
// Is there a way to access the `/content` URL?