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

* 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