Hacker News new | past | comments | ask | show | jobs | submit login

innerHTML is also really really evil. Apart from making for horrible ugly code, it plain doesn't work for many things (tables/forms have issues).

I'd take many of the points with a pinch of salt. Use profilers, and other debug methods to find out what works/doesn't work in your code.

For example the point about event listeners vs setting node.onclick. Perhaps it is marginally quicker. But will the user notice unless you add 1,000 event listeners? Unlikely. Might not even notice then. It all depends on where and how it's used. Also obviously you can't use .onclick if you want several event handlers attached to the same event unless you do that functionality yourself.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: