Re: [ambient light events LC] Feedback

On Tue, Dec 18, 2012 at 9:04 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> Convenient for whom?
>
> For the dictionary case, there is no extra convenience to it, in my opinion,
> over just having a null value allowed.
>
> For the LightLevelEventInit case, if we need to be able to represent "no
> value" in that interface, then I agree that "" is probably the way to go
> there, since it means that JS can just operate on the value as a string
> without having to worry about the "no value" case.
>
> Note that if desired you could till have the dictionary allow a nullable
> value so null/undefined work, and specify in prose that those are turned
> into the "no value" value of "" or whatever.  It seems to me this would be
> more JS-friendly.

FWIW, in the dictionary you do not need to define a default value, at
least not as far as events are concerned. For events you need to
define a default value in prose (because of document.createEvent()).
It needs to be neither nullable nor have a default value. For the
interface my suggestion was indeed to use the empty string for the
reason you state.


-- 
http://annevankesteren.nl/

Received on Tuesday, 18 December 2012 20:09:29 UTC