News for hackers. Stuff that matters.
Re:The time is right for a DOM templating API by llcooliovice on Friday June 27, 2025 @02:54AM (#44394322)
> There's no fundamental templating knowledge that's portable between stacks, and native DOM creation APIs like innerHTML are unsafe by default.

setHTML() is already implemented in Chrome/Edge and Firefox so this point is a bit outdated - there is a safe alternative to innerHTML.

Re:The time is right for a DOM templating API by infensus on Friday June 27, 2025 @06:42AM (#44395657)
MDN and caniuse say otherwise. I think there might've been an older specification that got implemented, but it's been revised since
Re:The time is right for a DOM templating API by llcooliovice on Friday June 27, 2025 @07:28AM (#44395912)
Chrome implemented a prototype, then the spec changed and they removed it, then they implemented the new version. I should have been clearer and said Chrome Canary and Firefox Nightly. Not sure when it will reach stable but probably some point this year, they’ve been working on it for ages and Safari is onboard.