`updatefound` event in service worker context seems unreliable
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 3.6k
- Forks
- 324
- Avg merge
- 14d 22h
- Merged PRs (30d)
- 1
Description
Currently we expose the service workers current registration as self.registration. In theory, the service worker can add an updatefound event handle on the registration to know when an event happens. This event in a service context, though, seems unreliable since it doesn't use ExtendableEvent. For example:
- The
updatefoundevent does not start the service worker if its been stopped. (AFAICT) - The
updatefoundevent does not provide anevent.waitUntil()method.
Should updatefound be usable in a service worker context? If so, should the browser start the worker to fire this event and should it be an ExtendableEvent? If its an ExtendableEvent, should waitUntil() delay the installation of the update?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the service worker registration behavior described in the issue, focusing on updatefound, stopped workers, ExtendableEvent, and event.waitUntil(). Compare the intended behavior for each question and document a clear specification decision for whether the event starts the worker and delays update installation.
Written by the indexing model from the issue text.
Assessment
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100