3 ms·
I think creating nodes in javascript is a nogo, keep your html in your templates and just read the templates from js and there you can refer to nodes to do what
by TeeWEE 14y ago
I think creating nodes in javascript is a nogo, keep your html in your templates and just read the templates from js and there you can refer to nodes to do whatever you want in js.
But as always there are exceptions to the rule, and then this lib may come in handy.
- wodow 14y agoWhy is it a "no go"?
- markyg 14y agoI've got a browser based notepad using local storage as the key:value store. I needed a way to 'open notes' and in turn create various tabs, etc. HTML wasn't an option in something so dynamic. I guess all I'm saying is, there are use-cases where it's fine
- TeeWEE 14y agoYeah indeed. Another option would be to use something like mustache and precomile your templates to javascript functions which you could use.