Click or drag to resize

CSSClientAddRuleAsync Method

Version 130.1.90
Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the position specified by `location`.

Namespace: CefSharp.DevTools.CSS
Assembly: CefSharp.Core (in CefSharp.Core.dll) Version: 129.0.110.0
Syntax
public Task<AddRuleResponse> AddRuleAsync(
	string styleSheetId,
	string ruleText,
	SourceRange location,
	int? nodeForPropertySyntaxValidation = null
)

Parameters

styleSheetId  String
The css style sheet identifier where a new rule should be inserted.
ruleText  String
The text of a new rule.
location  SourceRange
Text position of a new rule in the target style sheet.
nodeForPropertySyntaxValidation  NullableInt32  (Optional)
NodeId for the DOM node in whose context custom property declarations for registered properties should bevalidated. If omitted, declarations in the new rule text can only be validated statically, which may produceincorrect results if the declaration contains a var() for example.

Return Value

TaskAddRuleResponse
returns System.Threading.Tasks.Task<AddRuleResponse>
See Also