Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Writing ServiceWorker-Using Specifications #349
For the other specs (currently Background Synchronization, Push API, Task Scheduler) that extend Service Workers, we need to provide a guide in the spec. Here's a sketch of the section: https://gist.github.com/jungkees/3154398b8deee7c70139
Here's a rough sketch:
If a new web platform feature fires events within a ServiceWorker, or requires user permissions that last beyond the length of the page, it should extend
It's down to the API to decide whether to resolve/reject the promise. The API should be able to store state along with the registration (permissions granted, registrations etc).
Unregistration of the serviceworker will remove all state & registrations associated with the API (do we need to provide a hook here?).
Events fired to a ServiceWorker must only be targeted at the active worker in the associated registration.
ServiceWorker upgrades do not affect state stored along with the registration.
Existing APIs (defined outside of