Re: [WICG/webcomponents] Declarative CSS Module Scripts (#939)

+1, I think the idea of using an attribute to provide a URL / specifier is a really interesting thing to explore because it seems like it would generalize well to basically anything in HTML that describes some other resource and has either inline and external forms. (I'm writing it here as `cacheas` since I don't think it would really be a specifier anymore? Anyway, the name would need bikeshedding.)

So, not only could you have:

```html
<script type="module" cacheas="./some-path">
export let aString = "Hello, World!"
</script>
<script type="module">
import {aString} from "./some-path";
console.log(aString);
</script>
```

and

```html
<style cacheas="./some-path">
body::before {
  content: 'Hello, World!';
}
</style>
<link rel="stylesheet" href="./some-path">
```

But also things like:

```html
<img cacheas="./some-path" src='data:image/svg+xml,<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="120" height="60"><text y="30" x="30">Hello, World!</text></svg>'>
<img src="./some-path">
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/939#issuecomment-1024586424
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/939/1024586424@github.com>

Received on Friday, 28 January 2022 19:53:17 UTC