View Single Post
Old 01-02-2013, 07:34 PM   PM User | #13
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,447
Thanks: 0
Thanked 496 Times in 488 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
Quote:
Originally Posted by Old Pedant View Post
WHY would you WANT to continue to use appendChild() for <tr> and <td>????
I suppose if someone wanted a 2% increase in the code speed for Firefox and didn't care that it slows IE, Chrome and Safari down by 10% and Opera is slowed by 500% and that the code is much longer and harder to read then that someone would use appendChild for those calls instead of the table specific commands that are slightly faster in IE, Chrome and Safari and much faster in Opera as well as resulting in shorter easier to read code..

Of course you need to be creating a million tables for the speed difference to be measurable in fractions of a second so the ease of maintaining the code using insertRow and insertCell ought to be the main reason for using them with the fact that they are faster in all but one browser being a bonus.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote