← Back to CSS domain

CSS.setRuleSelector

Modifies the rule selector.

Domain: CSS experimental

Parameters

NameTypeDescription
styleSheetIdDOM.StyleSheetId
rangeSourceRange
selectorstring

Returns

NameTypeDescription
selectorListSelectorListThe resulting selector list after modification.

Example Request

{
  "id": 1,
  "method": "CSS.setRuleSelector",
  "params": {
    "styleSheetId": "styleSheetId-value",
    "range": "range-value",
    "selector": "h1"
  }
}

Example Response

{
  "id": 1,
  "result": {
    "selectorList": "selectorList-value"
  }
}

Usage in Node.js

const result = await send('CSS.setRuleSelector', {"styleSheetId": "styleSheetId-value", "range": "range-value", "selector": "h1"});
console.log(result);
// {"selectorList": "selectorList-value"}