W3C home > Mailing lists > Public > public-geolocation@w3.org > July 2011

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

From: Wojciech Masłowski <wmaslowski@opera.com>
Date: Tue, 12 Jul 2011 18:43:23 +0200
Message-ID: <4E1C79AB.9050209@opera.com>
To: Anne van Kesteren <annevk@opera.com>
CC: Bjoern Hoehrmann <derhoermi@gmx.net>, public-geolocation <public-geolocation@w3.org>
W dniu 2011-07-12 17:10, Anne van Kesteren pisze:
> On Tue, 12 Jul 2011 16:58:46 +0200, Wojciech Masłowski 
> <wmaslowski@opera.com> wrote:
>> Theoretically yes. In practice I don't think this is a problem. 
>> Unless your application does something like counting how many times 
>> the orientation event fired this shouldn't really change the way your 
>> application works. Note that significant change is vague enough so 
>> that the applications should not make any assumptions about timing at 
>> which they receive event therefore it is reasonable to assume that 
>> receiving one additional event should not cause the application to 
>> behave any different.
> Theoretically yes. In practice one implementation (lets say the market 
> leader) will fire the event when the listener is registered and 
> everyone will be required to follow. Wishy-washy requirements do not 
> work on the web. If you want interoperability implementations will 
> have to do the same, pretty much always.
I think you misunderstood me - what I meant is not that it doesn't make 
a difference from compatibility point of view if a browser sends an 
event or not, but that that it only matters for the first event you 
receive and not really that much for later events unless you rely on 
something you really shouldn't anyway.
> Aside from that, I do not think this group should change the semantics 
> of addEventListener(). If you want to change the semantics of 
> addEventListener(), please bring it up on www-dom@w3.org.
If we are to be really picky then adding event listener for device 
orientation enables the device compass which is a side effect. Other 
would be sending an empty event to signal that the runtime cannot 
provide values. Do you suggest that orientation doesn't fit DOM Events 
model and it should something else, for example the same approach as 

PS: Can you point me to any point in the DOM Events spec that states 
that addEventListener cannot have any side effects?

Wojciech Masłowski
Engeneering CORE Wrocław
Opera Software ASA
Received on Tuesday, 12 July 2011 16:44:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:51:02 UTC