4 ms·
This is extra steps compared to Shadow DOM [1]?! This is 15 lines of js and works with style tags anywhere in the page, and is particularly useful in SSR scenar
by infogulch 3y ago
This is extra steps compared to Shadow DOM [1]?! This is 15 lines of js and works with style tags anywhere in the page, and is particularly useful in SSR scenarios (which htmx encourages). Until we get declarative shadow dom [2] I don't think calling it 'fewer steps' is remotely reasonable.
[1]: https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM https://developer.mozilla.org/en-US/docs/Web/API/Web_compone...
[2]: https://developer.chrome.com/articles/declarative-shadow-dom/ https://developer.chrome.com/articles/declarative-shadow-dom... | https://caniuse.com/declarative-shadow-dom https://caniuse.com/declarative-shadow-dom