- From: Anne van Kesteren <notifications@github.com>
- Date: Tue, 26 Feb 2019 01:22:14 -0800
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/webcomponents/pull/793/review/207839958@github.com>
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. I think we'd make faster progress here. There's 290 people watching this repository. There's 6 people watching that. -- 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_r260191655
Received on Tuesday, 26 February 2019 09:22:35 UTC