You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Declare quantization and threshold check algorithms for extension to the spec.
Related to w3c/ambient-light#63, which says the granularity of the data
exposed by Ambient Light Sensors should be specified normatively.
This commit goes a bit further and lays out some of the scaffolding
necessary to specify the anti-fingerprinting measures currently implemented
by Chrome -- namely, not only are illuminance values rounded but there's
also a threshold value check to avoid storing values that are too close to
the latest reading.
The changes work as follows:
* Concrete sensor types (i.e. extension specifications) may define a
threshold check algorithm that compares two readings and returns whether
they differ enough or not.
* Concrete sensor types may define a reading quantization algorithm that is
used to quantize readings returned by the "get value from latest reading"
algorithm (which is used by attribute getters, for example).
* Specifications may define one of the algorithms above, both, or none, but
are encouraged to go with either none or both.
0 commit comments