-
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
unclear how Client.postMessage looks up its destination #1042
Comments
Please see the definition of the association between a
Note that by introducing the "reserved client concept" lately, the message queuing mechanism for |
I did read that definition, it makes for an explicit The null-check still makes no sense, because it didn't say e.g. "let destination be the [[SWContainer]] internal slot of the service worker client", which could be either a |
What spec says is not a mapping between a
Agreed. The destination should be initialized to null and should remain null if it doesn't get a target object. I'll address that point. |
This change addresses the issue described in the second paragraph of #1042 (comment). This change gets |destination| variable initialized to null if the ServiceWorkerContainer object does not exist. Fixes #1042.
Client.postMessage to an unloaded Client object must throw an "InvalidStateError" DOMException. (See https://w3c.github.io/ServiceWorker/#dom-client-postmessage.) This adds a test for that requirement. Related spec issue: w3c/ServiceWorker#1042. Related spec PR: w3c/ServiceWorker#1274.
This change addresses the issue described in the second paragraph of #1042 (comment). This change gets |destination| variable initialized to null if the ServiceWorkerContainer object does not exist. Fixes #1042.
See #1291. I don't think browsers can reasonably look up the destination synchronously. Cross-thread and cross-process issues require the lookup to be asynchronous. |
It sort of sounds like looking through the set of all ServiceWorkerContainers that possibly exist, and it's only implied that it sets destination to null if it didn't find any. Is it possible to make the mapping from service worker client -> ServiceWorkerContainer more explicit?
It's not clear in what cases it wouldn't find one.
The text was updated successfully, but these errors were encountered: