DOM.getDocument

Returns the root DOM node (and optionally the subtree) to the caller.

{
  "name": "getDocument",
  "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.",
      "experimental": true
    },
    {
      "name": "pierce",
      "type": "boolean",
      "optional": true,
      "description": "Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).",
      "experimental": true
    }
  ],
  "returns": [
    {
      "name": "root",
      "$ref": "Node",
      "description": "Resulting node."
    }
  ],
  "description": "Returns the root DOM node (and optionally the subtree) to the caller."
}