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

domenic commented on this pull request.



> +            \[[Configurable]]: <emu-val>true</emu-val>}.
+        1.  Perform [=!=] <a abstract-op>DefinePropertyOrThrow</a>(|interfaceProtoObj|, {{@@unscopables}}, |desc|).
+        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.  [=Expose the regular attributes=] of |interface| on |interfaceProtoObj| given |realm|.
+    1.  [=list/For each=] [=exposed=] [=regular operation=] |op| that is a [=member=] of |interface|:
+        1.  Let |method| be the result of [=creating an operation function|creating an operation function=]
+            given |op|, |interface|, and |realm|.
+        1.  Let |modifiable| be <emu-val>false</emu-val> if |op| is [=unforgeable=]
+            and <emu-val>true</emu-val> otherwise.
+        1.  Let |desc| be the PropertyDescriptor{\[[Value]]: |method|,
+            \[[Writable]]: |modifiable|, \[[Enumerable]]: <emu-val>true</emu-val>,
+            \[[Configurable]]: |modifiable|}.

Ah right, so we can't really fix this until we've defined "create an object". So I guess in the meantime we should leave this declarative with a pointer to future work.

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

Received on Thursday, 21 December 2017 21:36:14 UTC