#617: ModuleServiceWorker

Visit on Github.

Opened Mar 11, 2021

Ya ya yawm TAG!

I'm requesting a TAG review of ModuleServiceWorker.

Chromium supports three types of workers: Dedicated Workers, Shared Workers, and Service Workers. Importing ES modules has been implemented and shipped for Dedicated Workers, but not for Service Workers. We'd like to launch importing ES modules for service workers, since Service Workers are the foundation of PWAs (Progressive Web Apps) and should support importing ES modules to provide the new PWA features.

Further details:

  • [ Yes] I have reviewed the TAG's Web Platform Design Principles
  • Relevant time constraints or deadlines: [please provide]
  • The group where the work on this specification is currently being done:
  • The group where standardization of this work is intended to be done (if current group is a community group or other incubation venue):
  • Major unresolved issues with or opposition to this specification: n/a
  • This work is being funded by: Google

You should also know that...

[please tell us anything you think is relevant to this review]

We'd prefer the TAG provide feedback as (please delete all but the desired option): 💬 leave review feedback as a comment in this issue and @-notify [github usernames]

Discussions

Comment by @kenchris Mar 24, 2021 (See Github)

Is this different from what was implemented in Safari: https://trac.webkit.org/changeset/273224/webkit/ @hober

Comment by @ghazale-hosseinabadi Mar 25, 2021 (See Github)

No, it is the same. We are implementing it for Chrome.

Discussed Mar 29, 2021 (See Github)

[skipped]

Discussed May 1, 2021 (See Github)

Dan: left comment asking for an explainer.

Ken: this looks good to me.

Comment by @torgo May 12, 2021 (See Github)

@ghazale-hosseinabadi Thanks for this! Quick request: we noticed that the explainer link is actually pointing to a design doc. Can you please produce an explainer that starts with documentation of the user need? We've produce a guide on what this should generally look like. Also this should ideally be a markdown file which sits next to the spec. We're focused on starting with user need - in this case, I think it would be something like "service workers allow users to do x, y, z.. with this added feature users will now be able to do a, b, c." That would greatly help with the review process. Great to see the multi-stakeholder support for this, by the way! 👍🏻

Comment by @ghazale-hosseinabadi May 12, 2021 (See Github)

@d0iasm Since you are the author of the "ES Modules for Service Workers", do you want to convert it to a .md? I can also do it. Please let me know. Thanks!

Comment by @kenchris May 12, 2021 (See Github)

@ghazale-hosseinabadi make sure it talks about the Web Platform feature only. Chromium related parts can be left out

Comment by @ghazale-hosseinabadi May 24, 2021 (See Github)

@torgo @kenchris Where should I upload the markdown file? https://w3c.github.io/ServiceWorker/ or https://source.chromium.org/chromium? Thanks!

Comment by @wanderview May 24, 2021 (See Github)

@ghazale-hosseinabadi I recommend putting it in a service worker github issue in this case. Or maybe even in the existing issue for service worker modules with a note at the top saying "here is an explainer for the TAG review" or something.

Comment by @plinss May 24, 2021 (See Github)

Ideally the explainer should be in the repo along side the spec.

Also note, the explainer isn't just for the TAG, it's for everyone who wants a quick introduction to the spec, as well as capturing important information that doesn't necessarily belong in the spec, such as motivations, alternatives considered, etc. Having that helps everyone working on the spec in the future that wasn't in the room when it was first developed.

Comment by @wanderview May 24, 2021 (See Github)

Yes, but this is a case where the feature was discussed, reached consensus, and already spec'd in an established wg repo. (And indeed even implemented in two browsers.) The issue where the feature was discussed and where consensus was reached should already contain all the information. The one I recommended is the repo where it is spec'd.

Comment by @wanderview May 26, 2021 (See Github)

In retrospect, I think @ghazale-hosseinabadi linked an implementation design document in the TAG review. The best explainer, though, is probably the spec issue where this was discussed, consensus was reached, and it was spec'd:

https://github.com/w3c/ServiceWorker/issues/831

Discussed Aug 30, 2021 (See Github)

Dan: we didn't have time for this at our last face to face, it went into the abyss

Ken: we were fine with this right? Makes all the sense. Instead of the weird import script thing, now it's just a regular module. Makes sense to me, no concerns. Safari implemented it, and now they're implementing in Chrome

Dan: there's argument about the explainer, have they resolved this?

Ken: no they haven't. We could close unsatisfied because of that

Dan: I feel like we should do that. [leaves comment]

Ken: closing satisfied with concerns

Comment by @torgo Aug 31, 2021 (See Github)

@wanderview sorry this dropped off our radar. I take your point re: the explainer, however what you linked to really doesn't provide the level of info we talk about in our explainer explainer. We're really suggest that every TAG reviews should include an explainer that starts with (end) user needs - clearly described.

Comment by @kenchris Aug 31, 2021 (See Github)

The TAG is happy with this feature but closing with resolution satisfied with concerns due to the lack of an actual explainer