Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

should getRegistration() return anything for clients with a local URL that inherited the controller? #1326

Open
wanderview opened this issue Jun 13, 2018 · 1 comment

Comments

@wanderview
Copy link
Member

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?

@jakearchibald
Copy link
Contributor

jakearchibald commented Jun 14, 2018

Good catch. We should make this work for local URLs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants