-
Notifications
You must be signed in to change notification settings - Fork 59
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
The explicit secure context check is not needed #314
Comments
Remove the secure context check from abstract operations since the Sensor interface has [SecureContext] attribute. Fixes w3c#314
The Secure Contexts spec indeed states:
Furthermore, the WebIDL spec states:
Notably, "exposed" (emphasis mine) in the above normative text does not link to its formal definition, thus the behavior is currently underspecified AFAICT. The following informative note that follows the normative text references the formal definition of "exposed", but by virtue of it being a note, it cannot be counted on:
Ping @tobie to confirm whether the WebIDL spec should link to the formal definition of exposed in the normative prose in the [SecureContext] section. What comes to the proposal itself, it looks good assuming the WebIDL spec is clarified. |
Yes, that's because it's the generic computer science term that's used here, not the dfn. The spec's pretty explicit in the "exposed" dfn, and then again in the bindings. The note x-ref is good enough imho, as the spec is supposed to be taken as a whole (see conforming implementation). That said, I just fixed a small normative nit with the "exposed" dfn and turned it into an algorithm, which I think makes it stand out more. |
@tobie, thanks, it would be clearer if the generic term "exposed" and the "exposed" formal definition would be easier to distinguish from each other, optimally not share the same name. There are many occurrences of "exposed" using both the meanings in WebIDL (and elsewhere), so that refactor is out of scope for this particular issue I believe. To fix this ambiguity within the [SecureContext] section, how about rename:
Into: |
Yeah. Mind filling an issue? |
Filed whatwg/webidl#465 |
The explicit secure context check at https://w3c.github.io/sensors/#construct-sensor-object is not needed as sensor interfaces already have [SecureContext] specifier.
The text was updated successfully, but these errors were encountered: