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

Does the full mime type really need to be specified?  It would nice to provide notation that also could, in the future, support specifying inline data within a js file, just as html can do with js / css references.

I liked the idea proposed [here](https://github.com/w3c/webcomponents/issues/645#issuecomment-310811695):

```JavaScript
import styles from './styles.css' as StyleSheet;
```

Later, once this is implemented, a follow-up proposal would be to allow inline text, which the browser could optimize around, knowing what format to expect:

```JavaScript
import styleSheet from string `
div { color: green; }
` as StyleSheet;

Or was that proposal found problematic?
```


-- 
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-537093242

Received on Tuesday, 1 October 2019 15:33:10 UTC