Re: [sensors] Should we request permission when sensor is not supported by the platform?

> how can we specify an option for doing so?

In the future, we could do something like this instead:

1. Check to see if the sensor exists.
1. If it doesn't, then throw a NotReadableError and abort these steps.
    Note User Agents may decide to throw a NotAllowedError here 
instead (after random but bounded delay) in order to hide the absence 
of the sensor on the device.
1. Prompt the user for permission to access the sensor.
1. If the user grants access, then update readings.
1. Otherwise, throw a NotAllowedError.

> Still, the discussion from above applies.
> Can we offer an optional way of fencing all API calls behind 
permissions?

Not sure what you mean. What are you suggesting we do? What are you 
intending to accomplish by it?

-- 
GitHub Notification of comment by tobie
Please view or discuss this issue at 
https://github.com/w3c/sensors/issues/145#issuecomment-262551797 using
 your GitHub account

Received on Wednesday, 23 November 2016 15:47:17 UTC