surroundContents

fun surroundContents(newParent: Node)(source)

The surroundContents() method of the Range interface surrounds the selected content by a provided node.

MDN Reference