Re:HTML Web Components
by algem on Monday November 13, 2023 @11:12AM
(#38251843)
How would an "Html Web Component" handle state change? I was a bit lost on the benefits given the example of wrapping an img tag. Sure you could group and reuse common elements but you would still need javascript to do anything interactive. Even in the example given the alt text of the image is typically dynamic now because of localization so even then content is missing with javascript.
[ Parent
| on HN ]
Re:HTML Web Components
by hyperhello on Monday November 13, 2023 @11:14AM
(#38251876)
That’s what JavaScript is supposed to be for: state change. Not rendering the page.