replaceChild method
Implementation
@override
@mustCallSuper
Node? replaceChild(Node newNode, Node oldNode) {
if (enableWebFProfileTracking) {
WebFProfiler.instance.startTrackUICommandStep('Element.replaceChild');
}
// Update renderStyle tree.
if (newNode is Element) {
newNode.renderStyle.parent = renderStyle;
}
if (oldNode is Element) {
oldNode.renderStyle.parent = null;
}
if (enableWebFProfileTracking) {
WebFProfiler.instance.finishTrackUICommandStep();
}
return super.replaceChild(newNode, oldNode);
}