Re: [heycam/webidl] [WIP] Define Web IDL Modules (#675)

Ms2ger commented on this pull request.



> +    1.  Return |moduleRecord|.
+</div>
+
+<div algorithm>
+  To <dfn>initialize the module map</dfn> of a [=Realm=] |realm|:
+
+    1.  Let |map| be the [=module map=] associated with |realm|'s [=relevant settings object=].
+    1.  For every [=module=] |module| that is [=exposed=] in |realm|,
+        1.  Let |name| be the [=module/specifier=] of |module|.
+        1.  Let |record| be the result of [=create a synthetic module record=]
+            for |module| in |realm|.
+        1.  [=map/Set=] |map|[|name|] to |record|.
+</div>
+
+<div algorithm>
+  To <dfn>set a module attribute</dfn> |attribute| of a module specifier |specifier| in a

I think this should be "of a module |module|".

> +<div algorithm>
+  To <dfn>initialize the module map</dfn> of a [=Realm=] |realm|:
+
+    1.  Let |map| be the [=module map=] associated with |realm|'s [=relevant settings object=].
+    1.  For every [=module=] |module| that is [=exposed=] in |realm|,
+        1.  Let |name| be the [=module/specifier=] of |module|.
+        1.  Let |record| be the result of [=create a synthetic module record=]
+            for |module| in |realm|.
+        1.  [=map/Set=] |map|[|name|] to |record|.
+</div>
+
+<div algorithm>
+  To <dfn>set a module attribute</dfn> |attribute| of a module specifier |specifier| in a
+  [=Realm=] |realm| to an IDL value |value|:
+
+    1.  Let |esValue| be |value| [=converted to an ECMAScript value=].

Assert that |value| is of the type the attribute is declared as.

> +    <pre class="syntax">
+        [Exposed=Window, SecureContext]
+        module "std:timezone" {
+          interface Timezone {
+            readonly attribute USVString name;
+            long long offsetMs(long long unixTime);
+          };
+          Timezone getCurrentTimezone();
+          readonly attribute Timezone initialTimezone;
+        };
+    </pre>
+
+    <blockquote>
+        The [=module evaluation steps=] of "std:timezone" are as follows:
+            1.  [=set a module attribute|Set the attribute=]
+                "initialTimezone" of "std:timezone" to a [=new=]

Would be nice if we could use "of **this** module".

-- 
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/675#pullrequestreview-212348876

Received on Friday, 15 March 2019 15:28:59 UTC