reparent method

  1. @override
TagflowNode reparent([
  1. TagflowNode? newParent
])
override

Reparent the node

Implementation

@override
TagflowNode reparent([TagflowNode? newParent]) {
  return TagflowElement(
    tag: tag,
    textContent: textContent,
    children: children.map((e) => e.reparent(this)).toList(),
    parent: newParent,
    attributes: attributes,
  );
}