News for hackers. Stuff that matters.
Re:Templating in HTML by cantSpellSober on Tuesday October 04, 2022 @08:41PM (#33089398)
<template> (along with <slot>) allows for a declarative shadow DOM instead of clunky attachShadow()s on hidden <div>s (which doesn't work server-side)

Otherwise you probably don't need <template>, in fact they don't handle events the same as the rest of the DOM and will likely cause more pain

Re:Templating in HTML by imaginamundo on Tuesday October 04, 2022 @09:20PM (#33089808)
I read an article about it that i liked a lot.

https://web.dev/declarative-shadow-dom/

I even tried to build a library around this, but still don’t know how to finish it hahaha.

https://github.com/imaginamundo/webcomponents