On Aug 25, 5:04 am, "Erik Beeson" <[EMAIL PROTECTED]> wrote:
> > I'm not aware of any general problems with IE modifying elements in the
> > head.
>
> Thanks for the info on doing it natively. Is this something that might
> make sense to add to the jQuery core, if not just for consistency? I
> don't expect jQuery to be a full String parser, but since it seems
> that it pretty much already is, might it make sense to address this so
> it works consistently?
This was the approach I was going, but didn't know the particulars.
Mikes native code is much faster (duh!). But I wonder if he has a
memory leak here:
style.replaceChild( document.createTextNode(css), style.firstChild);
But I don't know is replaceChild() literlally means replace and
deleted the old node.
Anyway, I agree with you. A new set of methods can be added to do
these type of fast CSS updating.
Also, I agree with Mike. I saw the the same thing with the <style>
method. When you see something that may work for both, typically you
(speaking in general) should use that code. Yes, not in all cases,
but in this case, I would think that replace/add is "technically more
correct" than just always append only.
--
HLS