Re: [WICG/webcomponents] [idea] HTML Modules: Allow exporting without a script (#863)

Spitballing:

**template.html**
```html
<export name="default">
  <template>
    Hello, I am a template!
  </template>
</export>
```

**index.html** (possibly)
```html
<script type="module">
import template from './template.html'

console.log(template instanceof HTMLTemplateElement) // true
</script>
<import name="default" src="./template.html">
```

Or perhaps it should be a DocumentFragment. Or it could throw an error if there are more than one child. Not sure. I think having an element dedicated to this would be better than an attribute however.

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

Message ID: <WICG/webcomponents/issues/863/1019341677@github.com>

Received on Saturday, 22 January 2022 19:16:04 UTC