DOM.getFlattenedDocument
Returns the root DOM node (and optionally the subtree) to the caller.
{
"name": "getFlattenedDocument",
"parameters": [
{
"name": "depth",
"type": "integer",
"optional": true,
"description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0."
},
{
"name": "pierce",
"type": "boolean",
"optional": true,
"description": "Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false)."
}
],
"returns": [
{
"name": "nodes",
"type": "array",
"items": {
"$ref": "Node"
},
"description": "Resulting node."
}
],
"description": "Returns the root DOM node (and optionally the subtree) to the caller."
}