Function cloneNode

  • Clone a node, and optionally its children.

    Type Parameters

    Parameters

    • node: T
    • recursive: boolean = false

      Clone child nodes as well.

    Returns T

    A clone of the node.