- From: Domenic Denicola <notifications@github.com>
- Date: Sat, 01 Oct 2016 08:38:01 -0700
- To: heycam/webidl <webidl@noreply.github.com>
- Message-ID: <heycam/webidl/pull/180/review/2433362@github.com>
domenic commented on this pull request. > +IDL {{OpenDictionary}}<|K|, |V|> values are represented by +ECMAScript <emu-val>Object</emu-val> values. + +<p id="es-to-open-dictionary"> + An ECMAScript value |O| is [=converted to an IDL value|converted=] to an IDL <code>{{OpenDictionary}}<|K|, |V|></code> value as follows: +</p> + +<ol class="algorithm"> + 1. Let |result| be a new empty instance of <code>{{OpenDictionary}}<|K|, |V|></code>. + 1. If [=Type=](|O|) is <emu-val>Undefined</emu-val> or <emu-val>Null</emu-val>, + return |result|. + 1. If [=Type=](|O|) is not <emu-val>Object</emu-val>, + <a lt="es throw">throw a <emu-val>TypeError</emu-val></a>. + 1. Let |keys| be [=?=] [=EnumerableOwnProperties=](|O|, "key"). + 1. Repeat, for each element |key| of |keys| in [=List=] order: + 1. If [=!=] [=HasOwnProperty=](|O|, |key|) is <code>true</code>, then: Fair enough. @annevk, @bzbarsky, what do you think of my suggestion? I'm not sure why we do what we do in StrucuredClone, and I suspect legacy constraints. -- 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/180
Received on Saturday, 1 October 2016 15:38:31 UTC