I believe that innerhtml is not completely guaranteed to work the same way across browsers, while the Prototype DOM methods are.
Walter On Dec 10, 2009, at 10:02 PM, Rob Cluett wrote: > Why would we add an element using prototype's DOM method over > innerhtml in any scenario if we can use innerhtml and subsequently > use $(element) to immediately retrieve a reference to it? I was told > in the begining that innerhtml was the wrong way. > > Message sent from my Motorola Droid. > > >> On Dec 8, 2009 4:30 PM, "david" <[email protected]> wrote: >> >> Hi all, >> > I was under the impression that it would not actually be added to >> the DOM > when using innerhtml.... >> >> In fact, it's faster than any JS implementation, prototype or other. >> Browser are optimize to parse HTML string in an unbeatable way ! >> >> And of course it could be manipulate as a DOM element, but you'll >> have >> first to retrieve it from DOM using $() or $$(). >> >> -- >> david >> >> -- >> >> You received this message because you are subscribed to the Google >> Groups "Prototype & script.aculo.us" group. >> To post to this group, send email to >> [email protected] >> . To unsubscribe from t... >> >> For more options, visit this group at >> http://groups.google.com/group/prototype-scriptaculous?hl=en >> . >> >> > > > -- > > You received this message because you are subscribed to the Google > Groups "Prototype & script.aculo.us" group. > To post to this group, send email to [email protected] > . > To unsubscribe from this group, send email to > [email protected] > . > For more options, visit this group at > http://groups.google.com/group/prototype-scriptaculous?hl=en > . -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
