Consider exposing Page Lifecycle state to service-worker
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 3.6k
- Forks
- 324
- Avg merge
- 14d 22h
- Merged PRs (30d)
- 1
Description
Page lifecycle state could be exposed on WindowClient (similar to visibilityState): in particular Frozen and Discarded states.
We need concrete use-cases for these: please comment here, if you have any.
One possible case is (new API for) updating tab title from service worker (eg. inbox count in gmail).
While currently such sites needing updating of title / playing a sound (chat notification) etc don't get frozen, in the future there could be an API to support this via service worker. Such an API may need to know page lifecycle state.
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 reading the linked Page Lifecycle specification and comparing its states with the existing WindowClient visibilityState API. Review the four comments for concrete use cases, especially service-worker-driven tab-title or notification updates. Done would require agreed use cases and a clear direction for exposing Frozen and Discarded states.
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
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100