W3C home > Mailing lists > Public > public-webrtc@w3.org > November 2013

Re: ACTION-88: Remove '?' characters from all dictionaries

From: Adam Bergkvist <adam.bergkvist@ericsson.com>
Date: Tue, 26 Nov 2013 10:32:26 +0100
Message-ID: <52946AAA.3060002@ericsson.com>
To: Martin Thomson <martin.thomson@gmail.com>
CC: "public-webrtc@w3.org" <public-webrtc@w3.org>
On 2013-11-25 19:01, Martin Thomson wrote:
> On 25 November 2013 04:35, Adam Bergkvist <adam.bergkvist@ericsson.com> wrote:
>> Do you think it's ok if chann.maxRetransmits (the attribute on the
>> DataChannel) is null if not initialized (by the dictionary).
> Do you mean that you are having trouble with the defaults?
> Omitting maxRetransmits will result in nullptr in C++, null in Java,
> and undefined in JavaScript, unless you specify it as:
> dictionary blah {
>    (double or Range) maxRetransmits? = null;
> }
> In which case the JavaScript value changes to null.  That is
> unnecessary.  Define it as:
> dictionary blah {
>    (double or Range) maxRetransmits;
> }
> Then leave the language bindings to do their magic.  Yes, that means
> that  { maxRetransmits: null } is an invalid constraint.  That's a
> good thing.

I'm with you on the dictionary part that we don't need null there.

I'm talking about the corresponding attribute on the DataChannel object. 
The attribute from which you can read back, e.g., maxRetransmits when 
the object has been created. And the question was if you think it's ok 
for that *attribute* to be nullable.

I'll just go ahead and do the change and then we can look at the result 
and take it from there.

Received on Tuesday, 26 November 2013 09:32:50 UTC

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