loading... Pacem JS

ServiceWorker Proxy

PacemServiceWorkerProxyElement manages the registration of the ServiceWorker and keeps track of the relevant ServiceWorkerRegistration to exploit its functionalities.

Here an example for the utilization:

<pacem-serviceworker-proxy id="sw" src="/sw.js" on-register="console.log($event.detail)" on-subscribe="console.log($event.detail)"></pacem-serviceworker-proxy>  

In the following snippet it is shown how to simply declaratively subscribe/unsubscribe to Push Notifications.

Don't worry: no notifications will actually be sent.