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

littledan commented on this pull request.



> +                1.  Assert: |member| is an [=attribute=].
+                1.  Assert: The module evaluation steps will set each attribute.
+        1.  Run the [=module evaluation steps=] for the [=module/specifier=] of
+            |module|, if any are present.
+    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|.

This line doesn't really make sense. The module map is keyed by URLs, whereas specifiers are strings (even if we concatenate a prefix on). Should we make built-in module specifiers be URLs? Or make the map somehow heterogeneous, with special handling in HTML's module specifier resolution algorithm? Or something else?

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

Received on Sunday, 10 March 2019 08:57:09 UTC