insertRule method
[This documentation is preliminary and is subject to change.]
Inserts a new rule into the style sheet.
![]() ![]() |
Syntax
long retVal = object.insertRule(bstrRule, lIndex);
Standards information
Parameters
bstrRule [in]
Type: BSTRThe text that represents the rule, which must be able to be parsed. For rule sets, this specifies both the selector and the style declaration. For at-rules, this specifies both the at-identifier ("@rule_name") and the rule content.
lIndex [in]
Type: longThe index within the style sheet's rule list of the rule before which to insert the specified rule. If the specified index equals the length of the style sheet's rule list, the rule will be added to the end of the style sheet.
Remarks
After the new rule has been inserted, it becomes part of the cascade.
See also
Reference
Build date: 1/23/2012
.png)
.png)