CSS.getLayoutTreeAndStyles

For the main document and any content documents, return the LayoutTreeNodes and a whitelisted subset of the computed style. It only returns pushed nodes, on way to pull all nodes is to call DOM.getDocument with a depth of -1.

{
  "name": "getLayoutTreeAndStyles",
  "parameters": [
    {
      "name": "computedStyleWhitelist",
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Whitelist of computed styles to return."
    }
  ],
  "returns": [
    {
      "name": "layoutTreeNodes",
      "type": "array",
      "items": {
        "$ref": "LayoutTreeNode"
      }
    },
    {
      "name": "computedStyles",
      "type": "array",
      "items": {
        "$ref": "ComputedStyle"
      }
    }
  ],
  "description": "For the main document and any content documents, return the LayoutTreeNodes and a whitelisted subset of the computed style. It only returns pushed nodes, on way to pull all nodes is to call DOM.getDocument with a depth of -1.",
  "experimental": true
}