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

For your div demo, sure, heck even the "todoapp" might work well enough with it.

But please, build something proper with just that and presumably a .innerHTML = ...

Let us know how it goes :)



I have many times and you've probably seen it in the wild but I won't give myself away that easily. A Fortune 50 does this with great success.


The point is you're susceptible to XSS attacks with that code.

But with a "tagged template" it should be easy to treat the variables before actually doing the templating, without making the code ugly.


It’s just an example




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

Search: