-
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
should Client.navigate() reject on uncontrolled clients? #1254
Comments
[From https://bugzilla.mozilla.org/show_bug.cgi?id=1430999] The reason I'd like this restriction to stay is the following: I'm trying to implement code signing of web applications using Service Workers. Basically, the SW checks all responses from the server, and also the new SW file when an I know this is not the kind of thing the SW spec was designed for, but the spec does actually fit this use case if implemented carefully, and I'd be really grateful if it stayed thusly — I think it's a relatively important use case. |
Hmm, I think we should lift the restriction and perhaps look at some way of opting back into it. If we want to expose the clients API to all pages, this is going to get in the way. |
Right. Perhaps the client could call It doesn't work today in Chrome and Firefox because:
|
Currently step 4 here:
https://w3c.github.io/ServiceWorker/#client-navigate
Requires that the
Client.navigate(url)
method reject if its called a Client that is not controlled by the current service worker.What is the purpose of this restriction?
I believe an origin could easily use
Client.postMessage()
and then modifywindow.location
. AIUI this is the same rationale why we don't require interaction fornavigate()
. Is this restriction legacy from beforeincludeUncontrolled:true
?This came up because we were not aware of this spec step and I tried to fix the WPT in web-platform-tests/wpt#8743.
The text was updated successfully, but these errors were encountered: