Re: [sensors] Call onchange only when data changes

> I agree. But that's been argued against a number of times (and I 
lost these arguments). Terseness trumped correctness here.

@tobie can you link to the issues/threads? In one of my original 
explanations, I defined both an "ondata" and "onchange" event: 
https://bugzilla.mozilla.org/show_bug.cgi?id=910150#c5. 

> - The "data" event (needs further definition). 
>     - The event must fire on the sensor instance object. 
>     - The event should fire on a constant, implementation 
independent interval, however the interval is recommended to match the
 current frame rate of requestAnimationFrame (this needs more 
attention).
> - The "change" event (needs further definition). 
>     - The event must fire on the sensor instance object. 
>     - The event should fire whenever there is a significant change 
in the sensor value. The definition of "significant change" is when 
the sensor's value changes between two "data" events and the 
difference of that change is greater then then value specified by the 
"threshold" property.


I'm not arguing for those semantics—just that I think two events might
 be ideal (this has always been the design of all sensor classes in 
J5)

-- 
GitHub Notification of comment by rwaldron
Please view or discuss this issue at 
https://github.com/w3c/sensors/issues/152#issuecomment-260702907 using
 your GitHub account

Received on Tuesday, 15 November 2016 17:09:25 UTC