Overview
Message Source: dev tools
Service Workers are fully supported in OpenFin. If navigator.serviceWorker is undefined or navigator.serviceWorker.register is returning "Cannot read property 'register' of undefined" it's likely the issue is that the Service Worker is not running in a secure context.
Service workers are required to run in a Secure Context (MDN Chromium), i.e. localhost
and/or https
. The value of window.isSecureContext
indicates wether those features are available (one caveat is this is true
for file://
URLs but won't work).
Workarounds
- run in a Secure Context (
localhost
and/orhttps
) - runtime flag:
--unsafely-treat-insecure-origin-as-secure
e.g.
"runtime": {
"arguments": "--unsafely-treat-insecure-origin-as-secure=http://example.com",
"version": "<VERSION>"
}
Comments
0 comments
Please sign in to leave a comment.