← Back to CSS domain
CSS.setStyleTexts
Applies specified style edits one after another in the given order.
Domain: CSS
experimental
Parameters
| Name | Type | Description |
edits | array | |
nodeForPropertySyntaxValidation (optional) | DOM.NodeId | NodeId for the DOM node in whose context custom property declarations for registered properties should be
validated. If omitted, declarations in the new rule text can only be validated statically, which may produce
incorrect results if the declaration contains a var() for example. |
Returns
| Name | Type | Description |
styles | array | The resulting styles after modification. |
Example Request
{
"id": 1,
"method": "CSS.setStyleTexts",
"params": {
"edits": []
}
}
Example Response
{
"id": 1,
"result": {
"styles": []
}
}
Usage in Node.js
const result = await send('CSS.setStyleTexts', {"edits": []});
console.log(result);
// {"styles": []}