W3C home > Mailing lists > Public > public-media-capture-logs@w3.org > December 2015

Re: [mediacapture-main] Is there any sense in having defaults for SupportedCapabilities?

From: Adam Bergkvist via GitHub <sysbot+gh@w3.org>
Date: Wed, 16 Dec 2015 09:14:53 +0000
To: public-media-capture-logs@w3.org
Message-ID: <issue_comment.created-165042503-1450257293-sysbot+gh@w3.org>
>From the WebIDL spec [1]:
"Dictionary members can also optionally have a default value, which is
 the value to use for the dictionary member when passing a value to a 
platform object that does not have a specified value."

"Warning
As with operation argument default values, is strongly suggested not 
to use of true as the default value for boolean-typed dictionary 
members, as this can be confusing for authors who might otherwise 
expect the default conversion of undefined to be used (i.e., false)."

My interpretation is that we can't use default values to describe what
 we want here since the dictionary is only returned. We need to 
describe in prose how to initialize the dictionary.

[1] 
http://heycam.github.io/webidl/#dfn-dictionary-member-default-value

-- 
GitHub Notification of comment by adam-be
Please view or discuss this issue at 
https://github.com/w3c/mediacapture-main/issues/293#issuecomment-165042503
 using your GitHub account
Received on Wednesday, 16 December 2015 09:14:55 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:27:28 UTC