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.
This patch contains massive refactoring of the abstract operations an…
…d internal slots used in the Sensor interface specification. The refactoring goals are: Recompose abstract operations so that duplication of the algorithms steps is removed. Drop the unused abstract operations and internal slots. Also the change brings the following behavioral changes: 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 behavior 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. Fixes w3c#199 Fixes w3c#200 Fixes w3c#201 Fixes w3c#203
- Loading branch information
Mikhail Pozdnyakov
committed
May 23, 2017
1 parent
2d22842
commit 6dbf88b
Showing
1 changed file
with
90 additions
and
167 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