Closed
Description
openedon Nov 7, 2019
In comments like WICG/webcomponents#839 (comment) and #3 (comment), various people have proposed that the existing module specifier be used to communicate the module type, perhaps with a scheme-like syntax at the beginning of the specifier.
I wouldn't really be in favor of this approach due to the following downsides:
- Various existing interpretations of module specifiers--e.g., URLs and paths--already have very complicated grammars, and it would add additional technical complexity to incorporate
- It will take time for existing URL parsers and processers to learn about the new syntax, and given all the manipulation they do, this seems bound to lead to security issues (h/t @slightlyoff for pointing this out)
- More importantly, it would be difficult for a human to parse out the module type and to write it
- A pseudo-scheme syntax wouldn't cleanly scale to multiple parameters, and a fragment/query parameter syntax would not work as it'd change semantics
What are other people's thoughts here?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels