Re: [w3c/webcomponents] HTML modules spec draft editorial feedback (#783)

@domenic,

For your third bullet point, what do you think about HTML Module Script/JS Module Script (and eventually JSON Module Script etc) types sharing a common abstract Module Script base type?
That is, do we want type hierarchy #⁠1:
Classic Script is a Script
Module Script is a Script
JS Module Script is a Module Script
HTML Module Script is a Module Script

Or #⁠2:
Classic Script is a Script
JS Module Script is a Script
HTML Module Script is a Script

Given that the current [Module Script](https://html.spec.whatwg.org/multipage/webappapis.html#module-script) struct doesn't have any items in addition to Script, there isn't extra state that a common Module Script base type would need to include.  However, for some algorithms it seems to me there is value in having a common "Module Script" type.  For example consider [Fetch a module script graph](https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-module-script-tree).  If there is no abstract Module Script type, what could this algorith return?  It would have to be a Script or a JS Module Script/HTML Module/Script union -- either of which don't seeem great.  So I'm leaning towards type hierarchy #⁠1 for this reason.

-- 
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/issues/783#issuecomment-461886129

Received on Friday, 8 February 2019 17:45:14 UTC