importNode

fun <T : Node> importNode(node: T, deep: Boolean = definedExternally): T(source)

Returns a copy of node. If deep is true, the copy also includes the node's descendants.

If node is a document or a shadow root, throws a "NotSupportedError" DOMException.

MDN Reference