Balazs Ree wrote: > On Fri, 20 Jun 2008 11:45:05 +0200, Godefroid Chapelle wrote: > >> Ramon Bartl wrote: > >>> ree told me already that the browsers don't allow to do an innerHTML >>> inside a table, but also told me that there is maybe a workaround from >>> __gotcha? >>> >>> Godefroid?;) do you know how to do the browser-innerHTML-table-dance? >>> >>> >> I have no magic wand for you now ;-) >> >> I think we will need to quit using innerHTML and go back to DOM >> construction. > > I think it's worth to elaborate this point a little. > > We can see from experience that both methods have their problems. > There is no silver bullet, and we have to prepare for providing > workarounds in the future as well, whichever method we choose - unless > some radical change happens in the world of browsers. > > innerHTML has its merits: it works on all browsers (except for this case > which is not covered by the standard), and it is the fastest way of > content insertion, according to all benchmarks.
I found benchmarks that show that DOM construction is actually slower but only 10%. Their claim being that most benchmarks forget to take escaping in account which needs to be done somewhere. > > For this reason, I believe that we should consider having two methods. > Apply the faster innerHTML for most cases, and provide another > (slower, but working) method for the special cases like the table rows > and others. In theory, I agree. I just wonder if we can think of all special cases. And if it would not be better to have a functioning system a little slower. You are not supposed to add enormous amount of HTML with Ajax. If you need to change so much HTML, it's maybe worth refreshing the whole page ! > > Best wishes, > > -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be _______________________________________________ Kss-devel mailing list Kss-devel@codespeak.net http://codespeak.net/mailman/listinfo/kss-devel