replaceChild method

  1. @override
  2. @mustCallSuper
Node? replaceChild(
  1. Node newNode,
  2. Node oldNode
)
override

Implementation

@override
@mustCallSuper
Node? replaceChild(Node newNode, Node oldNode) {
  // Update renderStyle tree.
  if (newNode is Element) {
    newNode.renderStyle.parent = renderStyle;
  }
  if (oldNode is Element) {
    oldNode.renderStyle.parent = null;
  }
  return super.replaceChild(newNode, oldNode);
}