Paul Prescod <paul@prescod.net>:

Correct the chaining between siblings.
This commit is contained in:
Fred Drake 2000-10-09 20:04:16 +00:00
parent eca576c68b
commit 13a3069c2b
1 changed files with 7 additions and 0 deletions

View File

@ -102,6 +102,13 @@ class Node:
newChild.parentNode = self
def appendChild(self, node):
if self.childNodes:
last = self.lastChild
node.previousSibling = last
last.nextSibling = node
else:
node.previousSibling = None
node.nextSibling = None
self.childNodes.append(node)
return node