ServiceWorkerContainer.oncontrollerchange

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The oncontrollerchange property of the ServiceWorkerContainer interface is an event handler fired whenever a controllerchange event occurs — when the document's associated ServiceWorkerRegistration acquires a new active worker.

Syntax

serviceWorkerContainer.oncontrollerchange = function(controllerchangeevent) { ... }

Example

// TBD

Specifications

Specification
Service Workers 1
# dom-serviceworkercontainer-oncontrollerchange

Browser compatibility

BCD tables only load in the browser