/// <summary> /// Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the /// position specified by `location`. /// </summary> /// <param name = "styleSheetId">The css style sheet identifier where a new rule should be inserted.</param> /// <param name = "ruleText">The text of a new rule.</param> /// <param name = "location">Text position of a new rule in the target style sheet.</param> /// <returns>returns System.Threading.Tasks.Task<AddRuleResponse></returns> public async System.Threading.Tasks.Task <AddRuleResponse> AddRuleAsync(string styleSheetId, string ruleText, CefSharp.DevTools.CSS.SourceRange location) { ValidateAddRule(styleSheetId, ruleText, location); var dict = new System.Collections.Generic.Dictionary <string, object>(); dict.Add("styleSheetId", styleSheetId); dict.Add("ruleText", ruleText); dict.Add("location", location.ToDictionary()); var methodResult = await _client.ExecuteDevToolsMethodAsync("CSS.addRule", dict); return(methodResult.DeserializeJson <AddRuleResponse>()); }
/// <summary> /// Modifies the rule selector. /// </summary> /// <param name = "styleSheetId">styleSheetId</param> /// <param name = "range">range</param> /// <param name = "selector">selector</param> /// <returns>returns System.Threading.Tasks.Task<SetRuleSelectorResponse></returns> public async System.Threading.Tasks.Task <SetRuleSelectorResponse> SetRuleSelectorAsync(string styleSheetId, CefSharp.DevTools.CSS.SourceRange range, string selector) { ValidateSetRuleSelector(styleSheetId, range, selector); var dict = new System.Collections.Generic.Dictionary <string, object>(); dict.Add("styleSheetId", styleSheetId); dict.Add("range", range.ToDictionary()); dict.Add("selector", selector); var methodResult = await _client.ExecuteDevToolsMethodAsync("CSS.setRuleSelector", dict); return(methodResult.DeserializeJson <SetRuleSelectorResponse>()); }
partial void ValidateSetRuleSelector(string styleSheetId, CefSharp.DevTools.CSS.SourceRange range, string selector);
partial void ValidateSetMediaText(string styleSheetId, CefSharp.DevTools.CSS.SourceRange range, string text);
partial void ValidateSetKeyframeKey(string styleSheetId, CefSharp.DevTools.CSS.SourceRange range, string keyText);
partial void ValidateAddRule(string styleSheetId, string ruleText, CefSharp.DevTools.CSS.SourceRange location);