Re: Spec update: deviceorientation event should fire when listener is first registered

On Tue, Jul 12, 2011 at 12:41 PM, Anne van Kesteren <annevk@opera.com> wrote:
> On Tue, 12 Jul 2011 13:37:11 +0200, Andrei Popescu <andreip@google.com>
> wrote:
>>
>> Right. Here's the specification on when to fire the event:
>>
>> "The event should fire whenever a significant change in orientation
>> occurs (...) In addition, when a new listener registers for the event,
>> implementations should fire the event as soon as sufficiently fresh
>> data is available."
>>
>> Is there anything not clear / confusing in this statement? If you were
>> to implement, would you know what to do?
>
> I think firing when a new listener registers for the event is wrong. Tying
> that together goes against the event model. addEventListener() has no such
> side effects.
>

What exactly is it wrong with it? And what alternative would you
suggest to solve the given problem?

Thanks,
Andrei

Received on Tuesday, 12 July 2011 11:43:02 UTC