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

Re: [ambient-light] What illuminance value should be reported for stopped sensor?

From: Alexander Shalamov via GitHub <sysbot+gh@w3.org>
Date: Tue, 01 Nov 2016 08:41:56 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-257514976-1477989714-sysbot+gh@w3.org>
@tobie As I mentioned, I would like to avoid to have references to 
internal data of a sensor object. But either way is fine for me 
(cloning or making reference). I have no objections if getter will 
return latest reading and in next update local reference would be `!==
 sensor.getLatestReading()`. Maybe someone will find it even useful, 
e.g. cached value can be invalidated and updated with latest.

If you are planning to change Sensor.reading to 
sensor.getLatestReading(), semantics will be slightly different, for 
example, after stop() is called, should sensor.getLatestReading() 
return null? If not, what happens if permission is revoked.

Anyways, your explanation about how you want API to behave was helpful
 and few fixes need to be made to implementation to align with the 
spec. Thanks.

GitHub Notification of comment by alexshalamov
Please view or discuss this issue at 
using your GitHub account
Received on Tuesday, 1 November 2016 08:42:02 UTC

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