[w3c/ServiceWorker] should getRegistration() return anything for clients with a local URL that inherited the controller? (#1326)

The `ServiceWorkerContainer.getRegistration()` method takes a URL, but allows it to default to the empty string.  Since the value is used to resolve a URL with the client's base URL, this effectively does a getRegistration() with the client's base URL.

Should this be expected to work for clients with a local URL (about:blank, blob:, etc) that are controlled by a service worker (thanks to inheritance)?  In these cases it seems a getRegistration() with the default arg will try to find a scope matching the local URL which should always fail.

It seems like the default arg form of getRegistration() is often used to get the registration for the controlling service worker.  Should we try to support this use case for these local URL clients?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1326

Received on Wednesday, 13 June 2018 20:47:49 UTC