Re: [ambient light events LC] Feedback

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 UTC