Results 1 to 1 of 1
December 28th, 2006, 02:50 PM #1
DOM removeChild() question
- Join Date
- January 18th, 2005
oldChild = element.removeChild(child)
* child is the child node to be removed from the DOM.
* element is the parent node of child.
* oldChild holds a reference to the removed child node. oldChild == child.
The removed child node still exists in memory, but is no longer part of the DOM. You may reuse the removed node later in your code, via the oldChild object reference.
If I "document.getElementById('child')" where both the removed child and the newly inserted child have id="child", will the code hiccup because the old node is still in memory, or will document.getElementById ignore the old node because the old child is no longer part of the DOM?
By AffiliRed Platform in forum AffiliRedReplies: 0Last Post: September 22nd, 2011, 08:17 AM
By AffiliRed Platform in forum AffiliRedReplies: 2Last Post: March 23rd, 2011, 05:39 AM
By AffiliRed Platform in forum AffiliRedReplies: 2Last Post: October 22nd, 2010, 01:56 AM
By TJ in forum Search Engine OptimizationReplies: 9Last Post: July 25th, 2003, 09:58 AM