← Back to Overlay domain

Overlay.highlightNode

Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.

Domain: Overlay experimental

Parameters

NameTypeDescription
highlightConfigHighlightConfigA descriptor for the highlight appearance.
nodeId (optional)DOM.NodeIdIdentifier of the node to highlight.
backendNodeId (optional)DOM.BackendNodeIdIdentifier of the backend node to highlight.
objectId (optional)Runtime.RemoteObjectIdJavaScript object id of the node to be highlighted.
selector (optional)stringSelectors to highlight relevant nodes.

Example Request

{
  "id": 1,
  "method": "Overlay.highlightNode",
  "params": {
    "highlightConfig": "highlightConfig-value"
  }
}

Example Response

{
  "id": 1,
  "result": {}
}

Usage in Node.js

const result = await send('Overlay.highlightNode', {"highlightConfig": "highlightConfig-value"});
console.log(result);