DOM.setAttributeValueSets attribute for an element with given id.
| Name | Type | Description |
|---|---|---|
nodeId | NodeId | Id of the element to set attribute for. |
name | string | Attribute name. |
value | string | Attribute value. |
{
"id": 1,
"method": "DOM.setAttributeValue",
"params": {
"nodeId": 1,
"name": "example-name",
"value": "example-value"
}
}
{
"id": 1,
"result": {}
}
const result = await send('DOM.setAttributeValue', {"nodeId": 1, "name": "example-name", "value": "example-value"});
console.log(result);