Skip to content

Commit

Permalink
Note what "present" means in ES close to its definition (#329)
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic authored and tobie committed Mar 24, 2017
1 parent fe42994 commit ca44d67
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4102,13 +4102,18 @@ to the dictionary members defined on |D| and on any of |D|’s
On a given dictionary value, the presence of each dictionary member
is optional, unless that member is specified as required.
When specified in the dictionary value, a dictionary member is said to be
<dfn id="dfn-present" export>present</dfn>, otherwise it is [=present|not present=].
<dfn id="dfn-present" export lt="present|not present" for="dictionary member">present</dfn>, otherwise it is [=not present=].
Dictionary members can also optionally have a <dfn id="dfn-dictionary-member-default-value" for="dictionary member" export>default value</dfn>, 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. Dictionary members with default values are
always considered to be present.

<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.
</p>

An [=ordered map=] with string [=map/keys=] can be implicitly treated as a dictionary value of a
specific dictionary |D| if all of its [=map/entries=] correspond to [=dictionary members=], in the
correct order and with the correct types, and with appropriate [=map/entries=] for any required
Expand Down Expand Up @@ -7127,7 +7132,7 @@ the object (or its prototype chain) correspond to [=dictionary members=].
1. If [=Type=](|V|) is not Undefined, Null or Object, then [=ECMAScript/throw=] a <emu-val>TypeError</emu-val>.
1. Let |dict| be an empty dictionary value of type |D|;
every [=dictionary member=]
is initially considered to be [=present|not present=].
is initially considered to be [=not present=].
1. Let |dictionaries| be a list consisting of |D| and all of |D|’s [=inherited dictionaries=],
in order from least to most derived.
1. For each dictionary |dictionary| in |dictionaries|, in order:
Expand Down

0 comments on commit ca44d67

Please sign in to comment.