Monday, August 28, 2006

Javascript: innerHTML vs. DOM

There's some debate about whether Javascript code should be using the DOM or innerHTML. My take is that browsers are designed to parse HTML and we should not reinvent the wheel, because it will only be buggier and
slower. Thus, I feel that the presumption ought to be that innerHTML be used before the HTML is parsed, and DOM afterwards.

No comments: