W3cubDocs

/DOM Events

pushsubscriptionchange

The pushsubscriptionchange event is fired to indicate a change in push subscription that was triggered outside the application's control, e.g. when browser refresh the push subscription. Previously, it was defined as the event to fire when a PushSubscription has expired.

General info

Specification
Push API
Interface
PushEvent
Bubbles
No
Cancelable
No
Target
Service worker
Default Action
None

Properties

None.

Examples

self.addEventListener('pushsubscriptionchange', function() {
  // do something, usually resubscribe to push and
  // send the new subscription details back to the
  // server via XHR or Fetch
});

push

See also

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/Events/pushsubscriptionchange