Hacker News new | ask | show | jobs
by akiro 1069 days ago
Shadow DOM is native web feature. If you don’t like it you can simply not use it. Lit does not force you to use Shadow DOM
1 comments

> Shadow DOM is native web feature.

Doesn't mean it's a good feature. This is recognised even by people who push them: https://w3c.github.io/webcomponents-cg/2022.html

--- start quote ---

It's worth noting that many of these pain points are directly related to Shadow DOM's encapsulation. While there are many benefits to some types of widely shared components to strong encapsulation, the friction of strong encapsulation has prevented most developers from adopting Shadow DOM, to the point of there being alternate proposals for style scoping that don't use Shadow DOM. We urge browser vendors to recognize these barriers and work to make Shadow DOM more usable by more developers.

--- end quote ---