whatwg / loader

Loader Standard
https://whatwg.github.io/loader/
Creative Commons Zero v1.0 Universal
609 stars 45 forks source link

How should the loader impact <script type="module">? #121

Open domenic opened 8 years ago

domenic commented 8 years ago

Forking from https://github.com/whatwg/html/pull/443#issuecomment-169161637 and the next two comments

Can you say more? Why?

src has an established meaning for web developers, having to do with URLs, not module specifiers. Breaking that mental model is not really acceptable. For example, <script src="jquery"></script> fetches http://example.com/base/url/jquery; <img src="jquery"> fetches http://example.com/base/url/jquery; and so <script type="module" src="jquery"> must also. But see below, maybe I didn't quite understand what you meant...

More concretely, an inline module (no src attribute) would go through the loader starting at the translate hook; an out-of-band module (with src attribute) would go through the loader starting at the fetch hook. IOW the point of my PS above was that both inline and out-of-band Githubissues.

  • Githubissues is a development platform for aggregating issues.