← Back to CSS domain
CSS.setMediaText
Modifies the rule selector.
Domain: CSS
experimental
Parameters
| Name | Type | Description |
styleSheetId | DOM.StyleSheetId | |
range | SourceRange | |
text | string | |
Returns
| Name | Type | Description |
media | CSSMedia | The resulting CSS media rule after modification. |
Example Request
{
"id": 1,
"method": "CSS.setMediaText",
"params": {
"styleSheetId": "styleSheetId-value",
"range": "range-value",
"text": "text-value"
}
}
Example Response
{
"id": 1,
"result": {
"media": "media-value"
}
}
Usage in Node.js
const result = await send('CSS.setMediaText', {"styleSheetId": "styleSheetId-value", "range": "range-value", "text": "text-value"});
console.log(result);
// {"media": "media-value"}