Re: [Ieleak-devel] real-time memory graph
Brought to you by:
matthiasmiller
From: Matthias M. <Blog@OutOfHanwell.com> - 2006-06-12 13:30:43
|
Hi Johan, are you thinking of a function like this? Or does the container need to be attached to the document? function removeElement(elem) { var container = document.createElement('DIV'); container.appendChild(elem.parentNode.removeChild(elem)); container.innerHTML = ""; } -Matthias Miller jsrosman wrote: > > Hi Matthias > > Setting outerHTML to "" is not a generic solution it is read-only for > a range some HTML node-types. Better to appending the child to be > removed to a dummy node somewhere in your document.documentElement and > then set the innerHTML of that dummy node to "". This can be > abstracted in a function of course. > > -Johan > > > Datum: 10/06/06 07:04 PM > > Van: "Matthias Miller" > > Aan: iel...@li... > > CC: > > Onderwerp : Re: [Ieleak-devel] real-time memory graph > > > > Johan Rosman wrote: > > > Hi, > > > > > > As mentioned earlier removeChild is a pseudo leak!. Better to set > > > innerHTML to "" instead. > > > > Thanks Johan. I documented this at > > > http://outofhanwell.com/ieleak/index.php?title=Fixing_Leaks#Pseudo-Leaks. > > > Am I right that it would also work to set the element's > outerHTML to ""? > > This would be another good function for the "anti-leak javascript > > library" that I mentioned recently. :-) > > > > -Matthias Miller > > > > > > > > _______________________________________________ > > Ieleak-devel mailing list > > Iel...@li... > > https://lists.sourceforge.net/lists/listinfo/ieleak-devel > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Ieleak-devel mailing list > Iel...@li... > https://lists.sourceforge.net/lists/listinfo/ieleak-devel > |