Re: [w3c/webcomponents] Update HTML Modules Proposed Spec changes and initial proposal document (#793)

annevk commented on this pull request.



>      - b\. If *url* is failure, then:
       - i\. Let *error* be a new TypeError exception.
-      - ii\. Set *htmlModule’s* *parse error* to *error*.
-      - iii\. Return *htmlModule*.  Note: This step is essentially validating all of the requested module specifiers. We treat a module with unresolvable module specifiers the same as one that cannot be parsed; in both cases, a syntactic issue makes it impossible to ever contemplate instantiating the module later.
-  - 8\.   Set *htmlModule’s* *record* to *result*.
-  - 9\.   Return *htmlModule*.
-- Define ParseHTMLModule(*source*, *realm*, *htmlModule*) as roughly the following.  TODO Given that we define  HTML Module Record in ES6, should this function be defined over there?  We’re using the HTML5 parser though...
-  - 1\. Let *record* be a new HTML Module record that this algorithm will subsequently initialize. 
-  - 2\. Run the HTML5 parser on source to obtain the result *document*.
-  - 3\. Set *record*.[[HostDefined]] = *htmlModule*.
-  - 4\. For each HTMLScriptElement *script* in *document*:
-    - a\. Let *se* be a new ScriptEntry record (see definition in ES6 changes above).
+      - ii\. Set *htmlModuleScript*'s *parse error* to *error*.
+      - iii\. Return *htmlModuleScript*.  Note: This step is essentially validating all of the requested module specifiers. We treat a module with unresolvable module specifiers the same as one that cannot be parsed; in both cases, a syntactic issue makes it impossible to ever contemplate instantiating the module later.
+  - 8\. Set *htmlModuleScript*'s *record* to *result*.
+  - 9\. Return *htmlModuleScript*.
+- Introduce a new algorithm ParseHTMLModule(*source*, *realm*, *htmlModuleScript*) as the following.

(And thanks for explaining the way script execution happens. That makes sense I think.)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/pull/793#discussion_r257147999

Received on Friday, 15 February 2019 08:52:32 UTC