DOM.copyTo

Creates a deep copy of the specified node and places it into the target container before the given anchor.

{
  "name": "copyTo",
  "parameters": [
    {
      "name": "nodeId",
      "$ref": "NodeId",
      "description": "Id of the node to copy."
    },
    {
      "name": "targetNodeId",
      "$ref": "NodeId",
      "description": "Id of the element to drop the copy into."
    },
    {
      "name": "insertBeforeNodeId",
      "$ref": "NodeId",
      "optional": true,
      "description": "Drop the copy before this node (if absent, the copy becomes the last child of targetNodeId)."
    }
  ],
  "returns": [
    {
      "name": "nodeId",
      "$ref": "NodeId",
      "description": "Id of the node clone."
    }
  ],
  "description": "Creates a deep copy of the specified node and places it into the target container before the given anchor.",
  "experimental": true
}