Re: [sensors] Call 'onchange' only when data changes and considering frequency hint

It's an observable difference that web developers could have reason to
 care about, so can't the spec require a certain timing? (Otherwise, 
one might want to requestAnimationFrame in the event handler.)

The timing of certain other events is guaranteed by 
https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model
 and in https://github.com/whatwg/html/issues/707 we're thinking about
 introducing an "animation frame task" concept.

Although it is tricky, it is possible to test the timing to some 
degree, see 
https://github.com/w3c/web-platform-tests/blob/master/fullscreen/api/element-request-fullscreen-timing-manual.html#L30

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

Received on Monday, 19 December 2016 13:48:23 UTC