-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Define an active service worker for a srcdoc/blank iframe - take 2 #3725
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
base: main
Are you sure you want to change the base?
Conversation
…or window objects
Following @zetafunction's comments on #3714 (comment), it seems like there are multiple different cases here that need to be handled (assuming that active service worker and origin should always be in sync):
It was also pointed out by @kinu that we need to make sure we take the iframe's |
@yoavweiss We probably need to try to write some test cases for each one so we can reason about them. I also am not sure all the cases for "non-initial about:blank". Also, there are There are some tests for initial about:blank and about:srcdoc here: There are some tests with data and blob URLs in here: Looks like we need to add non-initial about:blank and javascript: URL testing. |
I asked around a bit regarding "non-initial about:blank". Some cases to consider:
Does that sound right @annevk? An open question is if we should always inherit the service worker controller from the parent or from the source of the origin inheritance. There is some discussion of this in w3c/ServiceWorker#1261. |
Is there some way that we can sync the active service worker with the origin without handling all those cases one by one? I'm afraid that doing the latter might be error-prone and hard to maintain. We can do it if there's no alternative, but it might be worth while to try to come up with one |
I think it would be wonderful to have a "inherit stuff" algorithm that brought forward origin, service worker controller, etc. Maybe it would include stuff like CSP as well, etc. Then specs could just be written to "inherit stuff" and it would get everything. The question is, do we currently inherit everything consistently today? And if we don't, can we align them all to inherit consistently? This definitely seems like a bigger set of refactoring to the spec, though. |
@yoavweiss Are you working on this? If not, is that okay If i take over it to complete. |
I'm not actively working on this. Thanks for taking it on! :) |
I'm switching to a new PR as GH doesn't enable me to change branches :/
This is a continuation of #3714 which closes w3c/ServiceWorker#765.
/cc @annevk @domenic @wanderview
💥 Error: Wattsi server error 💥
PR Preview failed to build. (Last tried on Jan 15, 2021, 7:58 AM UTC).
More
PR Preview relies on a number of web services to run. There seems to be an issue with the following one:
🚨 Wattsi Server - Wattsi Server is the web service used to build the WHATWG HTML spec.
🔗 Related URL
If you don't have enough information above to solve the error by yourself (or to understand to which web service the error is related to, if any), please file an issue.