Re: [heycam/webidl] Make interface prototype object creation imperative (#494)

tobie commented on this pull request.



> +        1.  Set |unscopableObject| to be [=!=]
+            <a abstract-op>ObjectCreate</a>({{%ObjectPrototype%}} of |realm|).
+        1.  Let |desc| be the PropertyDescriptor{\[[Writable]]: <emu-val>false</emu-val>,
+            \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val>,
+            \[[Value]]: |unscopableObject|}.
+        1.  Perform [=!=] <a abstract-op>DefinePropertyOrThrow</a>(|interfaceProtoObj|, {{@@unscopables}}, |desc|).
+    1.  For each [=exposed=] [=regular attribute=] |attr| that is a [=member=] of |interface|,
+        1.  Let |getter| be the result of creating an [=attribute getter=]
+            given |attr|, |interface|,  and |realm|.
+        1.  Let |setter| be the result of creating an [=attribute setter=]
+            given |attr|, |interface|,  and |realm|.
+
+            Note: the algorithm to create an [=attribute setter=]
+            returns <emu-val>undefined</emu-val> if |attr| is [=read only=].
+        1.  Let |desc| be the PropertyDescriptor{\[[Get]]: |getter|, \[[Set]]: |setter|,
+            \[[Enumerable]]: <emu-val>true</emu-val>, \[[Configurable]]: <emu-val>true</emu-val>}.

Thanks for catching that. Had completely missed it!

-- 
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/494#discussion_r156026992

Received on Monday, 11 December 2017 10:03:38 UTC