[xmljs-users] DOMNode.removeChild() doesn't cleanup pointers
Brought to you by:
djoham,
witchhunter
From: Stepan R. <xm...@no...> - 2004-03-15 05:47:54
|
The DOMNode.removeChild(oldChild) method does not clean up nextSibling and previousSibling pointers of the oldChild. This can lead to problems when the child is then appended to some other node. The fix is in DOMNode.prototype.removeChild. Replace return oldChild; with oldChild.previousSibling = null; oldChild.nextSibling = null; return oldChild; - Stepan -- Stepan Riha xm...@no... |