Watch a service-worker registration for an update ready to activate.
Existing waiting workers and newly installed workers are reported only when
the page already has a controller, which distinguishes updates from a first
installation. Activation, UI, status copy, and reload policy remain under
caller control.
Controls for requesting activation and disposing all listeners.
Throws
If required registration, container, or callback methods are missing.
Remarks
This helper does not register a service worker, mutate the DOM, reload the page, or decide when an update should activate. activateWaiting returns false when no update is waiting or postMessage fails.
Watch a service-worker registration for an update ready to activate.
Existing waiting workers and newly installed workers are reported only when the page already has a controller, which distinguishes updates from a first installation. Activation, UI, status copy, and reload policy remain under caller control.
Usage: