Re: [sensors] Define sensor.hasReading accessor bound to [[lastEventFiredAt]]. Fixes gh-269

I would define `hasReading` as `state == activated && latest_reading["timestamp"] != null`.

The [[lastEventFiredAt]] is an aux slot used in `onreading` notification operations.
The `onreading` notification might not be in sync with `latest_reading` updates (latest_reading is shared between Sensor objects and `onreading` is send considering their individual frequency hints).

So could be 

1. let timestamp be result of invoking `get value from latest reading` with this and "timestamp" as arguments.
1. If timestamp is not `null`, return true.
1. Otherwise, return false.

-- 
GitHub Notification of comment by pozdnyakov
Please view or discuss this issue at https://github.com/w3c/sensors/pull/274#issuecomment-330787490 using your GitHub account

Received on Wednesday, 20 September 2017 08:48:11 UTC