DOM.setOuterHTMLSets node HTML markup, returns new node id.
| Name | Type | Description |
|---|---|---|
nodeId | NodeId | Id of the node to set markup for. |
outerHTML | string | Outer HTML markup to set. |
{
"id": 1,
"method": "DOM.setOuterHTML",
"params": {
"nodeId": 1,
"outerHTML": "<div>Modified</div>"
}
}
{
"id": 1,
"result": {}
}
const result = await send('DOM.setOuterHTML', {"nodeId": 1, "outerHTML": "Modified"});
console.log(result);