replaceChild method

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

Implementation

@override
Node? replaceChild(Node newNode, Node oldNode) {
  if (documentElement == oldNode) {
    documentElement = newNode is Element ? newNode : null;
  }
  return super.replaceChild(newNode, oldNode);
}