-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Service worker registration selection for iframes with srcdoc #321
Comments
When iframe srcdoc document is created during the steps in navigation algorithm, the document's Window object's environment settings object should inherit the parent browsing context's active (service) worker. This PR introduces an active worker for an environment settings object. This internal slot may be referenced in more places when adding hooks to service workers. Fixes whatwg#321. R= @annevk, @mikewest.
This is also true for |
I think those at least go through fetch (as local url requests)? If so, this text (https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#selection) seems to cover that. But sure it'd be better to specify that in the related steps directly. |
I think I might want to add some steps in Navigate for the selection of the registration for local urls. Also, I noticed that I cannot set the client's active worker to the registration's active worker in Handle Fetch step 12.5 as the target browsing context's Window object has not been created by that time. So setting an active worker to a window client should also be specified in the Navigate algorithm? |
Yeah, You probably want to hook the service worker stuff into when a document is created. And similarly at the place where a worker is created. |
Yes, please assign this issue to me. (Note that it'll take time as I'm planning a two weeks vacation later this month.) |
This PR defines an active worker for a Document and a WorkerGlobalScope and the corresponding steps that set the values when they are created. It also defines an active worker algorithm in the environment settings object that returns the stored active worker. This PR also defines setting an active worker for an iframe srcdoc document to the creator Document's active worker. (Fixes whatwg#321.) R= @annevk, @mikewest.
This PR defines an active worker for a Document and a WorkerGlobalScope and the corresponding steps that set the values when they are created. It also defines an active worker algorithm in the environment settings object that returns the stored active worker. This PR also defines setting an active worker for an iframe srcdoc document to the creator Document's active worker. (Fixes whatwg#321.) R= @annevk, @mikewest.
This PR defines an active worker for a Document and a WorkerGlobalScope and the corresponding steps that set the values when they are created. It also defines an active worker algorithm in the environment settings object that returns the stored active worker. This PR also defines setting an active worker for an iframe srcdoc document to the creator Document's active worker. (Fixes whatwg#321.) R= @annevk, @mikewest.
This PR defines an active worker for a Document and a WorkerGlobalScope and the corresponding steps that set the values when they are created. It also defines an active worker algorithm in the environment settings object that returns the stored active worker. This commit also makes the active worker of a document, whose address is local and who has its creator (a parent or an opener), initialized to the creator's document's active worker. The relevant steps are added both in the creating a new browsing context algorithm and in the initializing a new document algorithms. (Fixes whatwg#321) R= @annevk.
A document loading for an iframe with
srcdoc
attribute doesn't go through fetch algorithm. (That is, it uses the given value instead of fetching a resource.) So currently the selection (match) of the service worker registration for the navigation doesn't occur.In the recent service worker f2f, it has been discussed that once the
iframe
srcdoc
document is created, the resource requests for that document should be controlled by the containing frame's service worker. This bit should be specified.Related issue: w3c/ServiceWorker#765
The text was updated successfully, but these errors were encountered: