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

TimothyGu commented on this pull request.



> +        1.  [=list/For each=] [=exposed=] [=member=] |member| of |interface|
+            that is declared with the [{{Unscopable}}] [=extended attribute=]:
+            1.  Let |id| be |member|'s [=identifier=].
+            1.  Perform [=!=] <a abstract-op>CreateDataProperty</a>(|unscopableObject|, |id|,
+                <emu-val>true</emu-val>).
+        1.  Let |desc| be the PropertyDescriptor{\[[Value]]: |unscopableObject|,
+            \[[Writable]]: <emu-val>false</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>,
+            \[[Configurable]]: <emu-val>true</emu-val>}.
+        1.  Perform [=!=] <a abstract-op>DefinePropertyOrThrow</a>(|interfaceProtoObj|, {{@@unscopables}}, |desc|).
+    1.  If |interface| is declared with the [{{Global}}] [=extended attribute=], or
+        |interface| is in the set of [=inherited interfaces=] of an interface
+        that is declared with the [{{Global}}] [=extended attribute=], then:
+        1.  Set the internal methods of |interfaceProtoObj|
+            which are specific to [=immutable prototype exotic objects=]
+            to the definitions specified in
+            [=ECMA-262 §9.4.7|ECMA-262 §9.4.7 Immutable prototype exotic objects=].

We already use section numbers in various places. We can follow this up with another PR, but I think for now consistency is good.

-- 
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_r180259032

Received on Monday, 9 April 2018 23:24:56 UTC