Re: [ambient light events LC] Feedback

On 12/18/12 10:47 AM, Tab Atkins Jr. wrote:
> Makes sense, I guess (though I'm not super happy with having to
> explicitly add the empty string to every enum that's supposed to be
> "nullable").  In that case, the IDL would be:
>
> enum LightLevel { "dim", "normal", "bright", "" };
> [Constructor (DOMString type, optional LightLevelEventInit eventInitDict)]
> interface LightLevelEvent : Event {
>      readonly attribute LightLevel value;
> };
> dictionary LightLevelEventInit : EventInit {
>      LightLevel value = "";
> };

If you really want it nullable, why not make it nullable?  As in:

   dictionary LightLevelEventInit : EventInit {
       LightLevel? value = null;
   };

This would incidentally work a lot better with { value: undefined } than 
the proposal above...

What am I missing?

-Boris

Received on Tuesday, 18 December 2012 19:19:54 UTC