Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from w3c:main #28

Merged
merged 2 commits into from
Feb 17, 2024
Merged

[pull] main from w3c:main #28

merged 2 commits into from
Feb 17, 2024

Conversation

pull[bot]
Copy link

@pull pull bot commented Feb 17, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

tidoust and others added 2 commits February 7, 2024 15:31
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
Flag ServiceWorkerGlobalScope as SecureContext
@pull pull bot added the ⤵️ pull label Feb 17, 2024
@pull pull bot merged commit dc2efeb into asleekgeek:main Feb 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants