Skip to content

Commit 0fa7ba3

Browse files
authored
Merge pull request #434 from rakuco/reword-can-expose-sensor-readings-section
Reword the "Conditions to expose sensor readings" section
2 parents f15c553 + 2b77580 commit 0fa7ba3

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

index.bs

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -751,23 +751,20 @@ never exceed the [=sampling frequency=] for the given [=sensor type=].
751751

752752
## Conditions to expose sensor readings ## {#concepts-can-expose-sensor-readings}
753753

754-
The user agent must verify that all [=mandatory conditions=] are satisfied to ensure it
755-
<dfn>can expose sensor readings</dfn> to the {{Sensor}} objects of a certain
756-
[=sensor type|type=] that belong to a certain [=active document=].
757-
758-
The <dfn>mandatory conditions</dfn> are the following:
759-
- The given document's [=relevant settings object=] is a [=secure context=].
760-
- For each [=powerful feature/name=] from the [=sensor type=]'s associated
761-
[=sensor permission names=] [=ordered set|set=], the corresponding permission's
762-
[=permission state|state=] is "granted".
763-
- The [=visibility state=] of the document is "visible".
764-
- The document is [=allowed to use=] all the [=policy-controlled features=] associated
765-
with the given [=sensor type=].
766-
- [=Currently focused area=] belongs to a document whose origin is [=same origin-domain=]
767-
with the origin of the given [=active document=].
754+
The user agent <dfn>can expose sensor readings</dfn> to a given |document| if and only if
755+
all of the following are true:
756+
- |document|'s [=relevant settings object=] is a [=secure context=].
757+
- |document|'s [=visibility state=] is "visible".
758+
- The [=currently focused area=] belongs to a document whose origin is [=same
759+
origin-domain=] with |document|'s origin.
768760
- <dfn>Specific conditions</dfn>: The [=extension specifications=] that add new
769761
[=mandatory conditions|conditions=] hook into this specification at this point.
770762

763+
Note: In addition to the conditions above, it is important to note that {{Sensor}}
764+
subclasses invoke the [=check sensor policy-controlled features=] operation in their
765+
constructors, and [[#sensor-start]] invokes [=request sensor access=]. Together, these
766+
checks correspond to the mitigation strategies described in [[#mitigation-strategies]].
767+
771768
Note: In order to release hardware resources, the user agent can request underlying
772769
[=platform sensor=] to suspend notifications about newly available readings until it
773770
[=can expose sensor readings=].

0 commit comments

Comments
 (0)