parent.insertBefore(child, ref)
},
- replaceChild: (parent: Node, oldChild: Node, newChild: Node) => {
- parent.replaceChild(newChild, oldChild)
- },
-
removeChild: (parent: Node, child: Node) => {
parent.removeChild(child)
},
child.parentNode = parent
}
-function replaceChild(
- parent: TestElement,
- oldChild: TestNode,
- newChild: TestNode
-) {
- insertBefore(parent, newChild, oldChild)
- removeChild(parent, oldChild)
-}
-
function removeChild(parent: TestElement, child: TestNode) {
logNodeOp({
type: NodeOpTypes.REMOVE,
setText,
appendChild,
insertBefore,
- replaceChild,
removeChild,
clearContent,
parentNode,