W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2011

[whatwg] Media Stream API: What is the intended behaviour for undefined mandatory arguments?

From: Tommy Widenflycht <tommyw@google.com>
Date: Wed, 1 Jun 2011 09:57:53 +0200
Message-ID: <BANLkTim2e6H-6QH8rDv7q29XB1Dq3z7Saw@mail.gmail.com>
Hi Ian and the rest of the list,

We are having a bit of discussion regarding the correct behaviour
when mandatory arguments are undefined, see this webkit bug for history:
https://bugs.webkit.org/show_bug.cgi?id=60622

Could we have some clarification for the below cases, please:

var u;
var n = null;

// Should throw since u is undefined or just abort?
navigator.webkitGetUserMedia("audio", u);

// Will not throw but will abort.
navigator.webkitGetUserMedia("audio", n);

// Should throw because we are expecting at least two arguments.
navigator.webkitGetUserMedia("audio");

Thanks in advance,
Tommy


-- 
Tommy Widenflycht, Senior Software Engineer
Google Sweden AB, Kungsbron 2, SE-11122 Stockholm, Sweden
Org. nr. 556656-6880

This email may be confidential or privileged. If you received this
communication by mistake, please don't forward it to anyone else, please
erase all copies and attachments, and please let me know that it went to the
wrong person. Thanks!
And yes, I have to include this message in every outgoing email according to
EU law.
Received on Wednesday, 1 June 2011 00:57:53 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:06 UTC