07:05
<annevk>
HTML disagrees? I thought it was TC39 folks who insisted on using the same MIME type for classic and module scripts?
07:06
<annevk>
Anyway, too late now either way.
07:06
<bakkot>
sorry I meant the HTML spec, not its authors
07:06
<bakkot>
I do not recall who was responsible for that decision
07:07
<annevk>
I think the module champions at the time felt pretty strongly about it. Any kind of additional hurdle was thought to be too much. (The HTML side did end up imposing CORS much to the chagrin of the champions.)
07:08
<bakkot>
anyway I think it's probably the right thing, given how subtle the difference is
07:10
<annevk>
There are some disadvantages in that for certain optimizations you need to pipe through who requested the resource and then if the resource ends up being requested by something else as well that might get invalidated and such. But in practice I don't think anyone has attempted those.
07:12
<annevk>
If we did something like type: "script" ("script module script" lol) I guess we would enforce CORS and UTF-8 just like we do for all modules, so might not be completely 1:1.
07:13
<annevk>
Ah, "classic JavaScript module script" I guess
12:28
<littledan>
We've had a lot of turnover among module champions, maybe Kris Kowal or caridy remembers this discussion. Anyway there was lots of discussion about "use module" or something like that, which was rejected in favor of the idea that you could just change the script tag and that was it for the transition. Using the same mime type follows the same principle
12:48
<annevk>
I remember discussing this with dherman at Mozilla
17:26
<Kris Kowal>
I wasn’t participating at the time these decisions were made, but, this module champion doesn’t think it’s weird that CORS applies to modules. I don’t have strong feelings about the MIME type homo/heterogeneity issue, and though I don’t love the .mjs extension, the costs of that choice have been paid already. I also don’t hate “import with type script”. We wouldn’t emulate it in Hardened JavaScript but I don’t think that would meaningfully hurt the portability path. I imagine this being used to incorporate a jquery import or some such in the import graph.
17:27
<Kris Kowal>
(The reason we wouldn’t emulate it in Hardened JavaScript, and would actively prevent it with Module hooks, is that sloppy mode escapes confinement.)