Skip to content

Service worker registration selection for iframes with srcdoc #321

Open

Description

@jungkees

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

Activity

  1. annevk commented on Nov 9, 2015

    @annevk
    Member

    This is also true for about:blank, right? And for blob/data URLs?

  2. jungkees commented on Nov 9, 2015

    @jungkees
    ContributorAuthor

    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.

  3. jungkees commented on Nov 9, 2015

    @jungkees
    ContributorAuthor

    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?

  4. annevk commented on Nov 9, 2015

    @annevk
    Member

    Yeah, blob and data URLs do go through Fetch (not sure how the latter should be handled, perhaps it should always be without service worker). about:blank doesn't always.

    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.

  5. jungkees commented on Nov 10, 2015

    @jungkees
    ContributorAuthor

    Yes, please assign this issue to me. (Note that it'll take time as I'm planning a two weeks vacation later this month.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions