-
Notifications
You must be signed in to change notification settings - Fork 312
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
Support returning ServiceWorker Client environments from Clients.matchAll()
#1036
Comments
I like the idea of eventually making the clients API available to documents, so yeah, it makes sense to surface service worker clients here. |
Well, this is possible even without window.clients. If you have two service workers registered for the same origin and one does |
This is necessary to allow us to use 'service worker client' to reference Client objects that are actually backed by a ServiceWorkerGlobalScope environment.
…ceWorkerGlobalScope. Fixes w3c#1036 This adds a "serviceworker" `ClientType` and the associated "service worker client" object. It also adds a check to avoid having `clients.matchAll()` return a `Client` for the current environment.
I'll review #1074.
That seems like a good direction, but I'm worried the API as-is seems a bit awkward for the case between non-service worker clients. |
Yes, that is issue #955.
My proposal to fix that is in this comment: |
Now that we support matching uncontrolled Client environments it seems we should reasonably be able to get a Client object for a ServiceWorker. I believe the spec mostly already supports this as it doesn't explicitly exclude ServiceWorker environments. We just need to add a "serviceworker" enum value to ClientType.
The text was updated successfully, but these errors were encountered: