W3C home > Mailing lists > Public > public-device-apis-log@w3.org > September 2017

Re: [sensors] Undefined values makes GS a pain to work with using TypeScript

From: Rick Waldron via GitHub <sysbot+gh@w3.org>
Date: Mon, 18 Sep 2017 16:36:33 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-330280176-1505752582-sysbot+gh@w3.org>
> 1) introduce smth like Sensor.hasReading

Is this a static, class-side property? If so, what happens if there are more than one instance of a given Sensor? 

> and then make all properties return 0 in initial state 

I can easily see end developers getting tripped up on this, with code that forgets to check the "hasReading" signaling property :\

GitHub Notification of comment by rwaldron
Please view or discuss this issue at https://github.com/w3c/sensors/issues/269#issuecomment-330280176 using your GitHub account
Received on Monday, 18 September 2017 16:36:27 UTC

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