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

On Tue, Jul 12, 2011 at 12:16 PM, Anne van Kesteren <annevk@opera.com> wrote:
> On Tue, 12 Jul 2011 13:07:52 +0200, Steve Block <steveblock@google.com>
> wrote:
>>
>> Done with
>> http://dev.w3.org/cvsweb/geo/api/spec-source-orientation.html.diff?r1=1.37;r2=1.38;f=h
>
> I'm not sure this makes sense. The model is that events fire whenever
> specified

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?

> and that listeners can be used to catch them. That implementations
> optimize this by not actually firing events when there are no listeners is
> not something that should be exposed in specifications.
>

I'm not sure I understand this: where in the specification do we say
that "we should not fire events when there are no listeners" ?

Thanks,
Andrei

Received on Tuesday, 12 July 2011 11:37:36 UTC