W3C home > Mailing lists > Public > public-webrtc@w3.org > May 2015

Re: What is mandatory in RTCSessionDescription

From: Jan-Ivar Bruaroey <jib@mozilla.com>
Date: Wed, 20 May 2015 21:49:22 -0400
Message-ID: <555D39A2.60103@mozilla.com>
To: Martin Thomson <martin.thomson@gmail.com>, "public-webrtc@w3.org" <public-webrtc@w3.org>
On 5/19/15 3:57 PM, Martin Thomson wrote:
> [Constructor (optional RTCSessionDescriptionInit descriptionInitDict)]
> interface RTCSessionDescription {
>                  attribute RTCSdpType? type;
>                  attribute DOMString?  sdp;
>      serializer = {attribute};
> };
>
> Why is type nullable here?  Because the constructor argument is optional.
>
> Why is the constructor argument optional?

Because that used to be a requirement (no pun intended). But 
https://heycam.github.io/webidl/#changes says:

"Allow dictionary-typed trailing-position operation arguments not to be 
optional, if and only if the dictionary type has a required dictionary 
member. "

So yay!

> I'd have thought that we'd want to mark RTCSessionDescriptionInit.type
> as required, and remove this optionality here.

+1.

.: Jan-Ivar :.
Received on Thursday, 21 May 2015 01:49:52 UTC

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