forked from w3c/sensors
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sensor obects have their own a reading copies.
Fixes w3c#152. Each Sensor instance reads the sensor readings considering its individual frequency hint, sends 'onchange' and caches the sensor latest reading at this moment. The Sensor's attributes return values from the cached reading. Thus we achieve: - appearance of a new Sensor instance with a higher frequency hint does not affect the 'onchange' notification of the existing Sensor instances of the same type. - consistency between the Sensor's 'onchange' notification and its attribute values. Fixes w3c#168. A Sensor object returns reading values only in "activated" state and returns null otherwise.
- Loading branch information
Mikhail Pozdnyakov
committed
May 23, 2017
1 parent
2d22842
commit 70bd09c
Showing
1 changed file
with
93 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters