- From: Adam Bergkvist <adam.bergkvist@ericsson.com>
- Date: Thu, 5 Dec 2013 11:11:26 +0100
- To: "public-webrtc@w3.org" <public-webrtc@w3.org>
Hi We have a few cases in the spec where interfaces have nullable attributes, but the dictionaries used to initiate these attributes don't have nullable types for the corresponding dictionary members. I guess the platform could create an object by bypassing the dictionary (and set a value of null), but I think that should be an exception. Looking at the first one - I don't think we want a MediaStreamEvent with a null-MediaStream that would need a not-null-check before it can be used. Are any of the other motivated or should I remove the "?" from the attributes from all of them? /Adam dictionary MediaStreamEventInit : EventInit { MediaStream stream; }; [ Constructor (DOMString type, MediaStreamEventInit eventInitDict)] interface MediaStreamEvent : Event { readonly attribute MediaStream? stream; }; ============== dictionary RTCSessionDescriptionInit { RTCSdpType type; DOMString sdp; }; [ Constructor (optional RTCSessionDescriptionInit descriptionInitDict)] interface RTCSessionDescription { attribute RTCSdpType? type; attribute DOMString? sdp; serializer = {attribute}; }; ============== dictionary RTCIceCandidateInit { DOMString candidate; DOMString sdpMid; unsigned short sdpMLineIndex; }; [ Constructor (optional RTCIceCandidateInit candidateInitDict)] interface RTCIceCandidate { attribute DOMString? candidate; attribute DOMString? sdpMid; attribute unsigned short? sdpMLineIndex; serializer = {attribute}; };
Received on Thursday, 5 December 2013 10:11:58 UTC