Interface CSSGroupingRule

All Superinterfaces:
CSSRule, ExtendedCSSRule
All Known Subinterfaces:
CSSConditionRule, CSSSupportsRule, ExtendedCSSMediaRule
All Known Implementing Classes:
GroupingRule, MediaRule, SupportsRule

public interface CSSGroupingRule extends ExtendedCSSRule
Represents an at-rule that contains other rules nested inside itself.
  • Method Details

    • getCssRules

      ExtendedCSSRuleList<? extends ExtendedCSSRule> getCssRules()
      Get the list of CSS rules nested inside the grouping rule.
      Returns:
      a CSSRuleList object for the list of CSS rules nested inside the grouping rule.
    • insertRule

      int insertRule(String rule, int index) throws DOMException
      Inserts a new rule into this grouping rule collection.
      Parameters:
      rule - The parsable text representing the rule.
      index - The index within the collection of the rule before which to insert the specified rule. If the specified index is equal to the length of the rule collection, the rule will be added to its end.
      Returns:
      the index at which the rule was inserted.
      Throws:
      DOMException - if the index is out of bounds or there was a problem parsing the rule.
    • deleteRule

      void deleteRule(int index) throws DOMException
      Removes a CSS rule from the CSS rule list returned by getCssRules() at index.
      Parameters:
      index - the rule list index at which the rule must be removed.
      Throws:
      DOMException - INDEX_SIZE_ERR if index is greater than or equal to getCssRules().getLength().