Re: addEventListener with side effects

On Nov 16, 2011, at 11:32 , Dominique Hazael-Massieux wrote:
> During that discussion, it was argued that a callback pattern would
> probably have been a better approach for DeviceOrientation due to the
> need of powering hardware and getting first event upon registration —
> Robin, maybe something to document in the API cookbook after further
> discussion with Geo/Hixie/Anne ?

Yes, that sounds like a good idea, especially since there is already a section in the document discussing related matters. And you know what's just *great* about the fact that we're using GitHub? I can easily accept pull requests! :)

> To work around this potential mis-design, specific wording was added to
> the DeviceOrientation spec: "Implementations may fire the event if they
> have reason to believe the page does not have sufficiently fresh data"

It may just be me but that really smells like weasel wording. Maybe this is LC feedback fodder?

--
Robin Berjon
  robineko — hired gun, higher standards
  http://robineko.com/
  @robinberjon

Received on Wednesday, 16 November 2011 10:36:41 UTC