Comment by _benton 6 months ago You can with DSD. 2 comments _benton Reply JimDabell 6 months ago You can’t. At minimum you need to call customElements.define(). throwitaway1123 6 months ago You absolutely can. It's the primary purpose of the DSD (Declarative Shadow DOM), one of the many new specifications people complain incessantly about. <my-component> <template shadowrootmode="open"> <style> ::slotted(*) { font-weight: bold; font-family: sans-serif; } </style> <slot></slot> </template> <p>content</p> </my-component>
JimDabell 6 months ago You can’t. At minimum you need to call customElements.define(). throwitaway1123 6 months ago You absolutely can. It's the primary purpose of the DSD (Declarative Shadow DOM), one of the many new specifications people complain incessantly about. <my-component> <template shadowrootmode="open"> <style> ::slotted(*) { font-weight: bold; font-family: sans-serif; } </style> <slot></slot> </template> <p>content</p> </my-component>
throwitaway1123 6 months ago You absolutely can. It's the primary purpose of the DSD (Declarative Shadow DOM), one of the many new specifications people complain incessantly about. <my-component> <template shadowrootmode="open"> <style> ::slotted(*) { font-weight: bold; font-family: sans-serif; } </style> <slot></slot> </template> <p>content</p> </my-component>
You can’t. At minimum you need to call customElements.define().
You absolutely can. It's the primary purpose of the DSD (Declarative Shadow DOM), one of the many new specifications people complain incessantly about.