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

Re: [whatwg] Device proximity and light events

From: Rich Tibbett <richt@opera.com>
Date: Wed, 09 May 2012 12:40:42 +0200
Message-ID: <4FAA49AA.7080202@opera.com>
To: Scott González <scott.gonzalez@gmail.com>
Cc: "whatwg@whatwg.org" <whatwg@whatwg.org>, "Carr, Wayne" <wayne.carr@intel.com>, Doug Turner <dougt@mozilla.com>, JOSE MANUEL CANTERA FONSECA <jmcf@tid.es>, Andrei Popescu <andreip@google.com>, Jonas Sicking <jonas@sicking.cc>
Scott González wrote:
> On Tuesday, May 8, 2012, Doug Turner wrote:
>
>> You don't.  This API doesn't have device detection.  Don't assume that
>> onXXX means that the UA supports an event.
>>
>
> I thought this was the preferred way to check. I seem to recall a
> discussion about this and agreement that this was the best way to detect
> events.

The WHATWG spec [1] itself says the following:

"When support for a feature is disabled (e.g. as an emergency measure to 
mitigate a security problem, or to aid in development, or for 
performance reasons), user agents must act as if they had no support for 
the feature whatsoever, and as if the feature was not mentioned in this 
specification. For example, if a particular feature is accessed via an 
attribute in a Web IDL interface, the attribute itself would be omitted 
from the objects that implement that interface — leaving the attribute 
on the object but making it return null or throw an exception is 
insufficient."

If the feature is not yet implemented then the same principle should 
apply IMO (if that's not implicit in the above).

- Rich

[1] 
http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#extensibility
Received on Wednesday, 9 May 2012 10:41:28 GMT

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