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

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

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Tue, 12 Jul 2011 16:13:46 +0200
To: Wojciech Mas?owski <wmaslowski@opera.com>
Cc: public-geolocation <public-geolocation@w3.org>
Message-ID: <1sko179g8t5mhc3mri6vh0qvpdcib2p8cg@hive.bjoern.hoehrmann.de>
* wmaslowski@opera.com wrote:
>Tbh I wouldn't be that religious about it. Requiring browser to fire an 
>event after registering a handler solves the problem of registering a 
>handler to a non-moving device and doesn't have any specific negative 
>implications. Any other solution would mean complicating the API by 
>adding some method to force firing of orientation event or in other way 
>getting current orientation. From developer point of view it is also 
>simpler this way because any other solution forces him to treat initial 
>position as a special case.

Invoking a listener for "significant change in orientation" when there
was no "significant change in orientation" seems like something that can
easily lead to subtle bugs and glitches. You would do this whenever you
add an additional listener for the event if that triggers the event.
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Tuesday, 12 July 2011 14:14:08 UTC

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