Re: [heycam/webidl] Specify open dictionaries. (#180)

jyasskin commented on this pull request.



> +    An ECMAScript value |O| is [=converted to an IDL value|converted=] to an IDL <code>{{record}}<|K|, |V|></code> value as follows:
+</p>
+
+<ol class="algorithm">
+    1.  Let |result| be a new empty instance of <code>{{record}}<|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 [=?=] |O|.[=[[OwnPropertyKeys]]=]().
+    1.  Repeat, for each element |key| of |keys| in [=List=] order:
+        1.  Let |desc| be [=?=] |O|.[=[[GetOwnProperty]]=](|key|).
+        1.  If |desc| is not <emu-val>undefined</emu-val>
+            and |desc|.[=[[Enumerable]]=] is <emu-val>true</emu-val>:
+            1.  Let |typedKey| be |key| [=converted to an IDL value=] of type |K|.
+            1.  Let |value| be [=?=] [=Get=](|O|, |key|).

@domenic Done. Note that it's a little weird to call `Get()` when we already have the descriptor, but that's what `Object.assign()` does so oh well.

-- 
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#pullrequestreview-4325231

Received on Friday, 14 October 2016 18:54:55 UTC