| ▲ | no_wizard 8 hours ago | |||||||
Decoupling slots from shadow dom would make custom elements even better. I love custom elements. For non React.js apps I use them to create islands of reactivity. With Vue each custom element becomes a mini app, and can be easily lazy loaded for example. Due to how Vue 3 works, it’s even easy to share state & routing between them when required. They should really move the most worthwhile features of shadow dom into custom elements: slots and the template shadow-roots, and associated forms are actually nice. It’s all the extra stuff, like styling issues, that make it a pain in the behind | ||||||||
| ▲ | spankalee 7 hours ago | parent [-] | |||||||
There's really no way to decouple slots for shadow roots. For slots to work you need a container for the slots that the slotted elements do not belong to, and whose slots are separated from other slot containers. Otherwise you can't make an unambiguous relationship between element and slot. This is why a shadow root is a separate tree. | ||||||||
| ||||||||