W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2015

Re: in webIDL can a required dictionary member be nullable?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 22 Jul 2015 11:11:09 -0700
Message-ID: <CAAWBYDBMtRWT0-e4hn9t4v4-_7UqVqKbrh_eaD+8m9TF_-STfw@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: "=JeffH" <Jeff.Hodges@kingsmountain.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Mon, Jul 20, 2015 at 6:20 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 7/18/15 2:06 PM, =JeffH wrote:
>> but would be ok in the
>> case of the foo dictionary way up above because the DOMString members
>> therein are declared as nullable.
> Correct.

I think you misread, Boris.  If the message instances are empty
strings, it is *not* acceptable to serialize them as nulls,
*regardless* of whether they're nullable or not.

(It's okay to put a null in when there's nulls, and not okay to put a
null into the non-nullable version, but I think Jeff was asking the
above question (due to some confusion over Javascript's typing
system), not just "can I put a null into a nullable field?".)

Received on Wednesday, 22 July 2015 18:11:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:24 UTC