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

Tommy Widenflycht (ᛏᚮᛘᛘᚤ) tommyw at google.com
Wed Jun 1 00:57:53 PDT 2011

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:

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.

Thanks in advance,

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.

More information about the whatwg mailing list