- From: Philip Jägenstedt via GitHub <sysbot+gh@w3.org>
- Date: Thu, 15 Dec 2016 09:53:55 +0000
- To: public-webrtc-logs@w3.org
The trouble here is not only that `pc.addIceCandidate(null)` seems like a silly thing, but that the `(RTCIceCandidateInit or RTCIceCandidate)` union type can't be nullable per WebIDL: https://heycam.github.io/webidl/#idl-nullable-type The things that can't be nullable include "a union type that itself has includes a nullable type or has a dictionary or record type as one of its flattened member types." This in turn, is because for any dictionary, passing null or undefined behaves the same as `{}`, so making it nullable is in a sense redundant. Since `RTCIceCandidateInit` has a required member, `pc.addIceCandidate({})` and thus `pc.addIceCandidate(null)` will throw TypeError. Will https://github.com/w3c/webrtc-pc/pull/968 be merged soonish, or can we make this fix first? -- GitHub Notification of comment by foolip Please view or discuss this issue at https://github.com/w3c/webrtc-pc/pull/969#issuecomment-267286420 using your GitHub account
Received on Thursday, 15 December 2016 09:54:01 UTC