- From: Joe Pea <notifications@github.com>
- Date: Mon, 22 Mar 2021 13:16:01 -0700
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 22 March 2021 20:16:12 UTC
I see what you mean. There's nothing wrong with it. I was only wondering if there's a less verbose way to do it. What if with ```html <element name="percentage-bar" shadowmode="closed"> <div>...</div> <style>/*...*/</style> <script type=module> export default class MyEl extends HTMLElement { /*...*/ } </script> </element> ``` the script runs once, but all other content of the `<element>` element is treated like template content for each instance? If we could do that, then we could also extend the functionality to the following. In one file: ```html <!-- my-el.html --> <div>...</div> <style>/*...*/</style> <script type=module> export default class MyEl extends HTMLElement { /*...*/ } </script> ``` In another file: ```html <element name="my-el" shadowmode="closed" src="./my-el.html" /> ``` which is very appealing. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/885#issuecomment-804364046
Received on Monday, 22 March 2021 20:16:12 UTC