DOM.setAttributesAsTextSets attributes on element with given id. This method is useful when user edits some existing attribute value and types in several attribute name/value pairs.
| Name | Type | Description |
|---|---|---|
nodeId | NodeId | Id of the element to set attributes for. |
text | string | Text with a number of attributes. Will parse this text using HTML parser. |
name (optional) | string | Attribute name to replace with new attributes derived from text in case text parsed successfully. |
{
"id": 1,
"method": "DOM.setAttributesAsText",
"params": {
"nodeId": 1,
"text": "text-value"
}
}
{
"id": 1,
"result": {}
}
const result = await send('DOM.setAttributesAsText', {"nodeId": 1, "text": "text-value"});
console.log(result);