Re: [w3c/webcomponents] HTML, CSS, and JSON modules shouldn't solely rely on MIME type to change parsing behavior (#839)

> @rniwa how do you square that with the reality that only the module author - not the module consumer - is the authority on how to parse a module? are you suggesting that every import (including wasm modules) should have this tax, that an explicit inline type be declared?

That's the only model that works. In fact, that's *how Web works today*. Look at how stylesheets, scripts, images, etc... are loaded with `link` & `style` element. They specify how the content should be processed; e.g. as a stylesheet.

We don't have a generic mechanism by which we fetch a resource and process it as a stylesheet and apply its style or process it as a script and execute it based on its content type. That would be fundamentally less secure.

-- 
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/839#issuecomment-555370195

Received on Tuesday, 19 November 2019 07:23:49 UTC