4 ms·
What's wrong with using innerHTML?
by simonw 18y ago
What's wrong with using innerHTML?
- senthil_rajasek 18y agoPrimarily, memory leaks You can find better reasons here http://ajaxian.com/archives/the-problem-with-innerhtml http://ajaxian.com/archives/the-problem-with-innerhtml
- axod 18y agoSeveral bugs and issues, some things don't work, issues with tables... Not to mention the fact it just looks ugly and horrible IMHO. Setting innerHTML to a string, in order to deserialize a partial HTML fragment is just not nice. The DOM methods are actually pretty well thought out, and provide a far better interface to manipulate the document.