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

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

From: Doug Turner <doug.turner@gmail.com>
Date: Fri, 22 Jul 2011 16:45:29 -0700
Message-ID: <CAHni0v_kHEsfC0vN8PDcQvEOL19Vd6w7GRFFQVaj6orpjHsUqA@mail.gmail.com>
To: Andrei Popescu <andreip@google.com>
Cc: (wrong string) ‚owski <wmaslowski@opera.com>, Bjoern Hoehrmann <derhoermi@gmx.net>, public-geolocation <public-geolocation@w3.org>
> That's what's in the spec today, but what is your take on the concerns
> raised by Anne about addEventListener()?

I really haven't thought about it that deeply.  I was hoping that the
requirement of two events would obviously be crappy.

Basically, for me, it is about how hard is it for users to get their
job done.  It is convenient to get the last known good value when you
add *one* event listener.  I really don't want users to have to do
something like:

.addEventListener("deviceorientation", listener)
.addEventListener("deviceorientation-inital-state", listener)

Of course, Anne is probably correct -- the orientation event could
have happened before the listener was added.  That could, in theory,
present some problems... but I am having a hard time coming up a
concrete example that I care about.

Received on Friday, 22 July 2011 23:46:05 UTC

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