3 ms·
Just remember that sometimes doing things the "right" way can really slow your code down. I started coding believing that text should be added with createTextNo
by taitems 17y ago
Just remember that sometimes doing things the "right" way can really slow your code down. I started coding believing that text should be added with createTextNode and any HTML element should be created via createElement.
This causes two issues:
1. Memory leaks from deleted or hidden DOM that is still referenced.
2. Performance. innerHTML is still probably the fastest method of adding elements, as dirty as it seems.