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

Client.postMessage to unloaded Client #10153

Conversation

jungkees
Copy link
Contributor

@jungkees jungkees commented Mar 23, 2018

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.

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.
@ghost
Copy link

ghost commented Mar 23, 2018

Build PASSED

Started: 2018-03-23 14:56:28
Finished: 2018-03-23 15:04:40

View more information about this build on:

@wanderview
Copy link
Member

Do we really want this behavior? Typically other postMessage() methods do not throw.

@wanderview
Copy link
Member

@jungkees Also, how is the implementation capable of synchronously throwing here? The client and its ServiceWorkerContainer may be in another process.

@jungkees
Copy link
Contributor Author

@wanderview, thanks for reviewing. Let's discuss in w3c/ServiceWorker#1291.

@jungkees
Copy link
Contributor Author

Closing this PR without merging as per the decision made in w3c/ServiceWorker#1291: Client.postMessage to an unloaded client won't throw.

@jungkees jungkees closed this Mar 27, 2018
@jungkees jungkees deleted the postmessage-to-unloaded-client branch March 27, 2018 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants