← Back to CSS domain

CSS.setContainerQueryText

Modifies the expression of a container query. Deprecated. Use setContainerQueryConditionText instead.

Domain: CSS deprecated

Parameters

NameTypeDescription
styleSheetIdDOM.StyleSheetId
rangeSourceRange
textstring

Returns

NameTypeDescription
containerQueryCSSContainerQueryThe resulting CSS container query rule after modification.

Example Request

{
  "id": 1,
  "method": "CSS.setContainerQueryText",
  "params": {
    "styleSheetId": "styleSheetId-value",
    "range": "range-value",
    "text": "text-value"
  }
}

Example Response

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

Usage in Node.js

const result = await send('CSS.setContainerQueryText', {"styleSheetId": "styleSheetId-value", "range": "range-value", "text": "text-value"});
console.log(result);
// {"containerQuery": "containerQuery-value"}