OptionalonOptional handler invoked on every service worker statechange event.
When provided, this handler replaces the built-in Pinpoint auto-recording: the built-in analytics event is only recorded when no handler is supplied, which prevents duplicate telemetry for the same state change.
Options for ServiceWorker.register.