Add frozen or active lifecycleState to ServiceWorker Client

Exposes the client's PageLifecycle state on the ServiceWorker Client API.

Service workers do not know the state of a client. If a client is frozen it will not immediately handle a postMessage() being sent to it. In some situations the service worker may not wish to spam the client with messages because that may cause the client to be discarded. In other situations the service worker may wish to focus the window client causing the client to become unfrozen.

Documentation

Specification

Editor's draft

Status in Chromium

Blink>Scheduling


Behind a flag (tracking bug) in:

  • Chrome for desktop release 77
  • Chrome for Android release 77
  • Android WebView release 77

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

Owner

Last updated on 2019-09-15