Re: [heycam/webidl] Add an algorithm to create a platform object. (#635)

TimothyGu commented on this pull request.



> @@ -12346,12 +12364,60 @@ It is the responsibility of specifications using Web IDL to state
 which global environment (or, by proxy, which global object) each platform
 object is associated with.
 
+<div algorithm>
+  To create a <dfn export>new</dfn> object implementing the interface |interface|, with a Realm

I tend to prefer having a longer name for the &lt;dfn&gt; part, like "create a new object implementing an interface", which seems to be what we do with "create an operation function" etc. We can then have a shorter alternative link-text like just "new" or something, with a clarification in a note.

> @@ -12346,12 +12364,60 @@ It is the responsibility of specifications using Web IDL to state
 which global environment (or, by proxy, which global object) each platform
 object is associated with.
 
+<div algorithm>
+  To create a <dfn export>new</dfn> object implementing the interface |interface|, with a Realm
+  |realm|, perform the following steps:
+
+    1.  Return the result of creating a [=new-internal|new=] object implementing |interface|, with
+        |realm| and no target.
+</div>
+
+<div algorithm>
+  To create a <dfn lt=new-internal>new</dfn> object implementing the interface |interface|, with

Just to make it clearer, can we call this "to create internally" or something to that sense? Otherwise the call "create a new `URL` object in *realm*" could technically go into either of these definitions, as *newTarget* is optional here.

-- 
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/635#pullrequestreview-203574574

Received on Thursday, 14 February 2019 05:35:51 UTC