← Back to release summary

service worker: Don't expose the API to insecure contexts.

Category
Service Worker
Type
New or changed feature
Status
Enabled by default (Chrome 69)
Intent stage
None

Summary

Because of a technical limitation, navigator.serviceWorker was previously exposed on insecure contexts and threw a Security Error when used. After this change, navigator.serviceWorker will return undefined. This aligns with the specification.

Standards & signals

Docs: https://w3c.github.io/webappsec-secure-contexts/#secure-contexts

View on chromestatus.com