The previous definition of "can expose sensor readings" was a bit too loose.
It relied on a [=sensor type=] that was not passed to the operation and
used "given document" to refer to the active document referenced in a prior
paragraph.
Instead:
Do away with all the "mandatory conditions" bits and only define "can
expose sensor readings".
Make said "can expose sensor readings" check explicitly require a
Document. All parts of the spec that referenced this definition were
already invoking it together with "the current browsing context's active
document".
Remove the checks related to the Permissions and Permissions Policy APIs.
They required access to a sensor type that could not be easily retrieved
by all callers; additionally, concrete Sensor classes all perform the
Permissions Policy API checks in their constructors and Sensor.start()
ensures the required permissions have been granted. We now make this
explicit in a new note.
One possible improvement would be to normatively require all concrete Sensor
classes to invoke "check sensor policy-controlled features" in their
constructors, as this is currently done but not mandated.
Follow-up to the review comments in #433.
The previous definition of "can expose sensor readings" was a bit too loose. It relied on a
[=sensor type=]
that was not passed to the operation and used "given document" to refer to the active document referenced in a prior paragraph.Instead:
Document
. All parts of the spec that referenced this definition were already invoking it together with "the current browsing context's active document".Sensor.start()
ensures the required permissions have been granted. We now make this explicit in a new note.One possible improvement would be to normatively require all concrete Sensor classes to invoke "check sensor policy-controlled features" in their constructors, as this is currently done but not mandated.
Preview | Diff