News for hackers. Stuff that matters.
Re:HTML Web Components by fuzzy2 on Monday November 13, 2023 @04:30PM (#38255669)
My take is: As explained in the article, user-avatar does absolutely nothing. If anything, it could only enhance the existing markup (with behavior), but never replace it. It’s… semantic markup, if you will.

Baloney if you ask me.

Re:HTML Web Components by keepamovin on Monday November 13, 2023 @10:03PM (#38258507)
Yeah I was thinking about what it could do, but I don't get it. The point of custom elements is to define a class in JavaScript that does something. Custom elements are just a part of web components tho, and you can use shadow DOM, more JS, and templating with slots.

I guess user-avatar could define a template that includes styles and slots to turn the image into a round image and maybe add some caption and link to it. But that would still require JS to print the template.content.