Lachlan Hunt wrote:
> Thierry Koblentz wrote:
>> As a side note, I came across a comment of yours on
>> http://domscripting.com/blog/display/35 (the very first one) and I'm
>> surprised how that comment differs from the feedback you're giving me
>> here...
> Yeah, I know, but opinions change. But what I said was still true
> though, I have never used it for anything but testing. I still prefer
> to use the more structured DOM methods where possible, but there are
> use cases where innerHTML is the best solution.
NP. As I said, I was not really interested in hearing about innerHTML (been
there done that). That was not the purpose of my post.
In short, I wanted to know if this (for "small nodes" of course):
var objSpan=document.createElement('span');
while(obj.childNodes.length)objSpan.appendChild(obj.childNodes[0]);
obj.appendChild(objSpan);
Is better or not than this:
obj.innerHTML='<span>'+obj.innerHTML+'</span>'
And if not, why?
The thing is that if this solution is good/decent, I can change the "tone"
of the article so people can feel confident about using the method. Right
now, this article sounds more like I'm not even sure that it's worth using
it ;)
And that would help me remove the "smileys" from there too...
---
Regards,
Thierry | www.TJKDesign.com
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************