W3C home > Mailing lists > Public > public-device-apis@w3.org > December 2012

Re: [ambient light events LC] Feedback

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 18 Dec 2012 09:58:02 -0800
Message-ID: <CAAWBYDA_WqyHt14yjvuKeMoJRRPN3mZEMiG-+yFL1OcCbeBDEA@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: Glenn Maynard <glenn@zewt.org>, public-device-apis <public-device-apis@w3.org>, public-webapps <public-webapps@w3.org>
On Tue, Dec 18, 2012 at 6:01 AM, Anne van Kesteren <annevk@annevk.nl> wrote:
> On Tue, Dec 18, 2012 at 2:53 PM, Glenn Maynard <glenn@zewt.org> wrote:
>> That would break this:
>>
>>> * In 6.2.2 (the definition of how to fire the event), if the light
>>> level can't be determined, the .value attribute of the event should be
>>> null, not the empty string.  I've already handled the nullability in
>>> the WebIDL above.
>
> Ah fair point. Why not make the empty string part of the enum and use
> that? Can't think of another place where we'd use nullable enums and
> we do use the emtpy string as default in e.g. XMLHttpRequest.

It seems weird that enums would have a different "no value" behavior
than all the other attributes in the DOM.  Nulling things is the
common idiom here.

~TJ
Received on Tuesday, 18 December 2012 17:58:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 18 December 2012 17:58:51 GMT