• Home
  • Raw
  • Download

Lines Matching refs:newChild

80     def insertBefore(self, newChild, refChild):  argument
81 if newChild.nodeType == self.DOCUMENT_FRAGMENT_NODE:
82 for c in tuple(newChild.childNodes):
85 return newChild
86 if newChild.nodeType not in self._child_node_types:
88 "%s cannot be child of %s" % (repr(newChild), repr(self)))
89 if newChild.parentNode is not None:
90 newChild.parentNode.removeChild(newChild)
92 self.appendChild(newChild)
98 if newChild.nodeType in _nodeTypes_with_children:
100 self.childNodes.insert(index, newChild)
101 newChild.nextSibling = refChild
102 refChild.previousSibling = newChild
105 node.nextSibling = newChild
106 newChild.previousSibling = node
108 newChild.previousSibling = None
109 newChild.parentNode = self
110 return newChild
129 def replaceChild(self, newChild, oldChild): argument
130 if newChild.nodeType == self.DOCUMENT_FRAGMENT_NODE:
133 return self.insertBefore(newChild, refChild)
134 if newChild.nodeType not in self._child_node_types:
136 "%s cannot be child of %s" % (repr(newChild), repr(self)))
137 if newChild is oldChild:
139 if newChild.parentNode is not None:
140 newChild.parentNode.removeChild(newChild)
145 self.childNodes[index] = newChild
146 newChild.parentNode = self
148 if (newChild.nodeType in _nodeTypes_with_children
151 newChild.nextSibling = oldChild.nextSibling
152 newChild.previousSibling = oldChild.previousSibling
155 if newChild.previousSibling:
156 newChild.previousSibling.nextSibling = newChild
157 if newChild.nextSibling:
158 newChild.nextSibling.previousSibling = newChild
890 def insertBefore(self, newChild, refChild): argument
902 def replaceChild(self, newChild, oldChild): argument
1320 def appendChild(self, newChild): argument
1324 def insertBefore(self, newChild, refChild): argument
1332 def replaceChild(self, newChild, oldChild): argument