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

dandclark commented on this pull request.



> -  - 5\. Return *record*.
-- Change fetch a [single module script](https://html.spec.whatwg.org/#fetch-a-single-module-script) as follows:
-  - In step 9, allow HTML MIME type through in addition to JavaScript.
-  - In step 11, don’t unconditionally [create a module script](https://html.spec.whatwg.org/#fetching-scripts:creating-a-module-script).  Instead, key off the MIME type extracted in step 9, creating an HTML Module instead if we have an HTML MIME type.
-- Change step 5 of [fetch the descendants of a module script](https://html.spec.whatwg.org/#fetch-the-descendants-of-a-module-script) such that when record is an HTML Module, use [[SourceName]] from each *record*.[[RequestedModules]] instead of the Source Text Module Record field *record*.[[RequestedModules]].  This change basically just accounts for the differences in how Source Text Module Record and HTML Module Record store their descendant module URLs.
+      - i\. Set *se*[[InlineModuleRecord]] = null
+      - ii\. Set *se*[[ExternalScriptURL]] = *script’s* src URL
+    - d\. Append *se* to *scriptEntries*.
+  - 4\. Return a new HTML Module Record { [[Realm]]: *realm*, [[Environment]]: *undefined*, [[Namespace]]: *undefined*, [[Status]]: `"uninstantiated"`, [[EvaluationError]]: *undefined*, [[HostDefined]]: *htmlModuleScript*, [[RequestedModules]]: *scriptEntries*, [[DFSIndex]]: *undefined*, [[DFSAncestorIndex]]: *undefined* }.
+- Provide an implementation of the abstract operation HostGetDefaultExport(*module*) as the following:
+  1. Assert: *module* is an HTML Module.  Note: It is anticipated that in the future this may be expanded to support other module types (JSON etc).
+  1. Let *htmlModuleScript* be *module*.[[HostDefined]].
+  1. Let *document* be *htmlModuleScript*'s *document*.
+  1. Return *document*.
+- Change [fetch a single module script](https://html.spec.whatwg.org/#fetch-a-single-module-script) as follows:
+  - In step 9, allow `text/html` type through in addition to JavaScript.

Yeah, that's fair.  I changed the language to reflect that the MIME type discussion is still ongoing, and linked [#742](https://github.com/w3c/webcomponents/issues/742).

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

Received on Thursday, 14 February 2019 18:56:58 UTC