W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2012

Re: [whatwg] Device proximity and light events

From: Scott González <scott.gonzalez@gmail.com>
Date: Wed, 9 May 2012 11:31:29 -0400
Message-ID: <CAO8i3icOB6orN9We0qWKWovs+5Nfm_c8Z9O=PuNn3K-0b5V2sg@mail.gmail.com>
To: Doug Turner <dougt@mozilla.com>
Cc: Jonas Sicking <jonas@sicking.cc>, "whatwg@whatwg.org" <whatwg@whatwg.org>, JOSE MANUEL CANTERA FONSECA <jmcf@tid.es>, Andrei Popescu <andreip@google.com>, "Carr, Wayne" <wayne.carr@intel.com>
The original question was "How do you detect if the UA supports each of
these sensor?"

I don't think we're asking whether you'd get events, but whether you can
detect that the UA actually supports the event. I would think the UA should
expose support (via onxxx attributes) if the UA and device actually have
support, even if the sensor is turned off. There may be a separate API for
determining if the sensor is turned on, but I don't think that's what was
being asked.


On Wed, May 9, 2012 at 10:48 AM, Doug Turner <dougt@mozilla.com> wrote:

> That is different -- Hixie can chime in.
>
> I think the idea is that if you have and dom event handler, you should
> also have an onXXXX event handler attribute.  Its meaning is less defined.
>  I do not think it means that if ondevicemotion exists, that means you will
> always see device motion events.
>
> Doug
>
>
> On May 9, 2012, at 7:45 AM, Scott González wrote:
>
> > There was a related discussion on the mailing list:
> http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2010-November/029252.html
> >
> > I also found a message from Hixie to me, related to that thread: "I
> agree entirely that if an event has a use case, it makes sense for it to
> have an event handler attribute."
> >
> >
> > On Wed, May 9, 2012 at 10:31 AM, Doug Turner <dougt@mozilla.com> wrote:
> >
> > On May 9, 2012, at 3:14 AM, Anne van Kesteren wrote:
> >
> > > On Wed, May 9, 2012 at 5:59 AM, Doug Turner <dougt@mozilla.com> wrote:
> > >> Where was that discussion?
> > >
> > > This came up at the WebApps F2F and there was general agreement that
> > > if we added new events adding new event handler attributes would make
> > > sense.
> >
> > Was there any notes taken?
> >
> >
> > > Feature detection of some kind is useful as forcing people to
> > > do UA sniffing leads to badness.
> >
> > I am not arguing that it shouldn't be done.   I just don't think it as
> important as most people.  For example, even if the device is present, it
> may be off or not responding.  In that case, you'll have a feature that
> tests positive and never receive any events.
> >
>
>
Received on Wednesday, 9 May 2012 15:36:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:08 GMT