attach method
Implementation
@override
void attach(DomRenderObject child, {DomRenderObject? after}) {
try {
child.parent = this;
final parentNode = node;
final childNode = child.node;
assert(parentNode.instanceOfString('Element'));
if (childNode == null) return;
final afterNode = after?.node;
if (childNode.previousSibling == afterNode && childNode.parentNode == parentNode) {
return;
}
if (kVerboseMode) {
print("Attach node $childNode of $parentNode after $afterNode");
}
if (afterNode == null) {
parentNode!.insertBefore(childNode, parentNode.childNodes.item(0));
} else {
parentNode!.insertBefore(childNode, afterNode.nextSibling);
}
} finally {
child.finalize();
}
}