← Back to CSS domain

CSS.setEffectivePropertyValueForNode

Find a rule with the given active property for the given node and set the new value for this property

Domain: CSS experimental

Parameters

NameTypeDescription
nodeIdDOM.NodeIdThe element id for which to set property.
propertyNamestring
valuestring

Example Request

{
  "id": 1,
  "method": "CSS.setEffectivePropertyValueForNode",
  "params": {
    "nodeId": 1,
    "propertyName": "propertyName-value",
    "value": "example-value"
  }
}

Example Response

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

Usage in Node.js

const result = await send('CSS.setEffectivePropertyValueForNode', {"nodeId": 1, "propertyName": "propertyName-value", "value": "example-value"});
console.log(result);