W3C home > Mailing lists > Public > public-device-apis-log@w3.org > November 2016

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

From: Tobie Langel via GitHub <sysbot+gh@w3.org>
Date: Wed, 23 Nov 2016 15:47:11 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-262551797-1479916030-sysbot+gh@w3.org>
> 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 

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

This archive was generated by hypermail 2.4.0 : Monday, 4 July 2022 12:47:53 UTC