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

tobie commented on this pull request.



> +                <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 not declared with the [{{Global}}] [=extended attribute=], then:
+        1.  [=Define the regular attributes=] of |interface| on |interfaceProtoObj| given |realm|.
+        1.  [=Define the regular operations=] of |interface| on |interfaceProtoObj| given |realm|.
+    1.  [=Define the constants=] of |interface| on |interfaceProtoObj| given |realm|.
+    1.  If the [{{NoInterfaceObject}}] [=extended attribute=] was not specified on |interface|, then:
+        1.  Let |constructor| be the [=interface object=] of |interface| in |realm|.
+        1.  Let |desc| be the PropertyDescriptor{\[[Writable]]: <emu-val>true</emu-val>,
+            \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val>,
+            \[[Value]]: |constructor|}.
+        1.  Perform [=!=] <a abstract-op>DefinePropertyOrThrow</a>(|interfaceProtoObj|, "<code>constructor</code>", |desc|).
+    1.  Return |interfaceProtoObj|.
 </div>
 

You mean [[[SetPrototypeOf]]](https://heycam.github.io/webidl/#platform-object-setprototypeof), right? Doesn't that belong on the instance itself rather than on the proto, though?

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

Received on Friday, 2 March 2018 13:10:02 UTC