ServiceWorkerGlobalScope: push event

The push event is sent to a service worker's global scope (represented by the ServiceWorkerGlobalScope interface) when the service worker has received a push message.

Bubbles No
Cancelable No
Interface PushEvent
Event handler property onpush


This example sets up a handler for push events that takes JSON data, parses it, and dispatches the message for handling based on information contained within the message.

self.addEventListener("push", event => {
  let message =;

  switch(message.type) {
    case "init":
    case "shutdown":
}, false);


Specification Status Comment
Push API
The definition of 'push' in that specification.
Working Draft Initial specification.

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
push eventChrome Full support 40Edge ? Firefox Full support 44
Full support 44
Notes Service workers (and Push) have been disabled in the Firefox 45 and 52 Extended Support Releases (ESR).
IE No support NoOpera Full support 24Safari Full support 11.1WebView Android Full support 40Chrome Android Full support 40Firefox Android Full support 44Opera Android Full support 24Safari iOS Full support 11.3Samsung Internet Android Full support 4.0


Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
See implementation notes.
See implementation notes.

See also