The service worker can be modified through hooks or by replacing events completely. By tapping into service worker hooks, developers are able to extend their APEX application to support advanced PWA features such as offline or push notifications, that are not yet offered declaratively in APEX.
Developers can hook into service worker events to add their own JavaScript code.
- Function and Variable Declaration
- Event: install
- Event: activate
- Event: fetch
- Event: sync
- Event: push
- Event: notificationclick
- Event: notificationclose
- Event: canmakepayment
- Event: paymentrequest
Go to the PWA attributes page in the APEX Builder to read more about how to leverage service worker hooks.