W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2015

Re: Dictionary errors

From: Adam Bergkvist <adam.bergkvist@ericsson.com>
Date: Wed, 26 Aug 2015 08:30:19 +0000
To: "public-script-coord@w3.org" <public-script-coord@w3.org>
CC: Jan-Ivar Bruaroey <jib@mozilla.com>
Message-ID: <A222C88B6882744D8D4B9681B3158890240171CD@ESESSMB307.ericsson.se>
On 2015-08-18 10:39, Adam Bergkvist wrote:
> Hi
>
> In the WebRTC WG, we have the getUserMedia() function where the script
> can specify which types of media it wants to request with a dictionary.
> For example:
>
> navigator.mediaDevices.getUserMedia({ "audio": true, "video": true});
>
> We currently reject with a NotSupportedError if the script doesn't
> specify at least one media type (e.g. an empty dictionary).
>
> We recently had a discussion about rejecting with a TypeError instead.
> The reason is that since the required keyword was introduced, there's a
> way to specify that not all Objects can represent a dictionary since
> there can be rules regarding what members that need to be present. We
> don't have a keyword to express that "at least one of these members need
> to be present", but we're expressing that in prose instead.
>
> We would very much appreciate your input on this.

No one?

/Adam
Received on Wednesday, 26 August 2015 08:30:45 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 26 August 2015 08:30:46 UTC