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

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

From: Martin Thomson <martin.thomson@gmail.com>
Date: Mon, 25 Nov 2013 10:01:39 -0800
Message-ID: <CABkgnnVsRj0G9JjWGio_Va6yA7nPWezadBMEnUCPAmu8z+qCcg@mail.gmail.com>
To: Adam Bergkvist <adam.bergkvist@ericsson.com>
Cc: "public-webrtc@w3.org" <public-webrtc@w3.org>
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.
Received on Monday, 25 November 2013 18:02:10 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:36 UTC