[webrtc-pc] Overloaded operations: Throw or reject?

adam-be has just created a new issue for 
https://github.com/w3c/webrtc-pc:

== Overloaded operations: Throw or reject? ==
```
pc.addIceCandidate(); // TypeError
```
The above code needs to produce a TypeError since the mandatory 
candidate argument is missing. We have specified two overloaded 
version of addIceCandidate:

```
// Promise version
Promise<void> addIceCandidate ((RTCIceCandidateInit or 
RTCIceCandidate)? candidate);

// Legacy version with callbacks
void addIceCandidate ((RTCIceCandidateInit or RTCIceCandidate) 
candidate, VoidFunction successCallback, 
RTCPeerConnectionErrorCallback failureCallback);

```
As specified, one should reject with TypeErrors during WebIDL argument
 checking, and the other should throw. What should happen in the case 
above?

Please view or discuss this issue at 
https://github.com/w3c/webrtc-pc/issues/615 using your GitHub account

Received on Wednesday, 4 May 2016 09:36:44 UTC