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

The activeWorker read-only property of the InstallEvent interface returns the ServiceWorker that is currently actively controlling the page.

This will return null if no active worker is already controlling the page.


var myActiveWorker = event.activeWorker


A ServiceWorker object.


self.addEventListener('install', function(event) {
  var myActiveWorker = event.activeWorker;


Specification Status Comment
Service Workers
The definition of 'InstallEvent' in that specification.
Working Draft Initial definition.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support40 ?441 No27 No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support4040 ?4427 No4.0

1. Service workers (and Push) have been disabled in the Firefox 45 & 52 Extended Support Releases (ESR).

See also

Document Tags and Contributors

Contributors to this page: fscholz, chrisdavidmills, Sebastianz, kscarfone
Last updated by: fscholz,