Integrating Your Service Worker
- Custom Service Worker: Inject the path of your custom service worker file
(e.g. "./**/your-service-worker-filename" or "./your-service-worker-filename")into the global variablewindow.__rb_app.swUrl. After injecting, output the variable to check if the path is correct. Then, in your service worker file, insert the lineimportScripts("./notification-sw.js").
Integration Code Example
- index.html
- service-worker.js
Important Notes
- The injection of window.__rb_app.swUrl must occur before the closing of the
<head>tag in index.html. - Only self-developed integrations are supported; packaged integrations can be ignored.
- For any integration issues, please contact customer support for assistance.