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

[webrtc-pc] Ambiguous wording in addIceCandidate

From: jan-ivar via GitHub <sysbot+gh@w3.org>
Date: Wed, 09 Nov 2016 02:30:38 +0000
To: public-webrtc@w3.org
Message-ID: <issues.opened-188154830-1478658637-sysbot+gh@w3.org>
jan-ivar has just created a new issue for 

== Ambiguous wording in addIceCandidate ==
"If candidate is not null but is missing values for both sdpMid and 
sdpMLineIndex, return a promise rejected with a TypeError."

Provided candidate is not null, is this

    if (!sdpMid && !sdpMLineIndex) { throw new TypeError(); }


    if (!sdpMid || !sdpMLineIndex) { throw new TypeError(); }


I read it as the former (opposite of s/both/either/), but I could see 
someone reading it as needing "both sdpMid and sdpMLineIndex", for 
which values can't be missing.

Which one is intended, and is there a better way to write this?

Please view or discuss this issue at 
https://github.com/w3c/webrtc-pc/issues/930 using your GitHub account
Received on Wednesday, 9 November 2016 02:30:45 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:18:22 UTC