AddRuleRequest

@Serializable
data class AddRuleRequest(val styleSheetId: StyleSheetId, val ruleText: String, val location: SourceRange, val nodeForPropertySyntaxValidation: NodeId? = null)

Request object containing input parameters for the CSSDomain.addRule command.

Constructors

Link copied to clipboard
constructor(styleSheetId: StyleSheetId, ruleText: String, location: SourceRange, nodeForPropertySyntaxValidation: NodeId? = null)

Types

Link copied to clipboard
class Builder(val styleSheetId: StyleSheetId, val ruleText: String, val location: SourceRange)

A builder for AddRuleRequest, which allows setting the optional parameters of the CSSDomain.addRule command via a lambda.

Properties

Link copied to clipboard

Text position of a new rule in the target style sheet.

Link copied to clipboard

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.

Link copied to clipboard

The text of a new rule.

Link copied to clipboard

The css style sheet identifier where a new rule should be inserted.