- From: Domenic Denicola <notifications@github.com>
- Date: Wed, 25 Mar 2020 12:33:54 -0700
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <heycam/webidl/pull/859/review/381472846@github.com>
@domenic commented on this pull request.
>
<p class="note">
- In the ECMAScript binding, a value of <emu-val>undefined</emu-val> is treated as
- [=not present=], or will trigger the [=dictionary member/default value=] where applicable.
+ In the ECMAScript binding, a value of <emu-val>undefined</emu-val> for the property
+ corresponding to a [=dictionary member=] is treated the same as omitting that property. Thus, it
+ will cause an error if the member is [=dictionary member/required=], or will trigger the
+ [=dictionary member/default value=] if one is present, or will result in no [=map/entry=]
+ existing in the dictionary value otherwise.
+</p>
+
+<p class="advisement">
+ As with [=optional argument/default value|operation argument default values=], it is strongly
+ encouraged not to use <emu-val>true</emu-val> as the [=dictionary member/default value=] for
+ {{boolean}}-typed [=dictionary members=], as this can be confusing for authors who might
+ otherwise expect the default conversion of <emu-val>undefined</emu-val> to be used (i.e.,
+ <emu-val>false</emu-val>).
Let's do that in a followup if desired, for both dictionaries and boolean arguments in general.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/pull/859#discussion_r398117430
Received on Wednesday, 25 March 2020 19:34:07 UTC