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

Re: [ambient light events LC] Feedback

From: Anne van Kesteren <annevk@annevk.nl>
Date: Tue, 18 Dec 2012 19:02:05 +0100
Message-ID: <CADnb78gJ30zBatUk9hZ5mEhv1fNp0Ntm2voozLRoGsmK3wi+xw@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
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:58 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> 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.

For strings and especially enums you'd either have a defined value as
default (which could be "default" or some such) or you'd use the empty
string as the default (like XMLHttpRequest).

Also, I don't think nulling things is the common idiom. Typical
defaults for a list would be the empty list, 0 for a number, given
that enums are strings, ...

Received on Tuesday, 18 December 2012 18:02:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:32:47 UTC