You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context for this is Open Web Docs people looking into automating the handling
of "this feature is available only in secure contexts" banners in MDN pages.
This led to the discussion in:
w3c/webref#1142 (comment)
When it is set, the `[SecureContext]` IDL extended attribute explicitly gives
the information. That said, to avoid redundancies, that attribute is not set on
interfaces that are exposed (through `[Exposed=xxx]`) on globals that are
already restricted to secure contexts/
The Service workers spec is clear that service workers must execute in secure
contexts:
https://w3c.github.io/ServiceWorker/#secure-context
However, it does not fully say so in the IDL itself. More specifically, when
an interface defined in another spec has `[Exposed=ServiceWorker]`, that's a
reference to the `ServiceWorkerGlobalScope` interface, and that interface does
not have a `[SecureContext]` attribute.
This commit adds the `[SecureContext]` attribute to `ServiceWorkerGlobalScope`.
This approach is consistent with the way `WorkletGlobalScope`, from which a
number of other globals inherit, is defined:
https://html.spec.whatwg.org/multipage/worklets.html#worklets-global
0 commit comments