Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The <template> element combined with the `cloneNode` works quite well for this. I've got a simple function which can take templates, clone them, fill in nodes with data from a structure, then prepare it to be added to the page.

Works a treat and makes most frameworks for the same seem completely pointless.



could you share some examples please? i am interested in trying this out.


Do you have some example code on a code forge somewhere? I would like to know more!




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: