Name
CSSStyleSheet.addRule( ): IE-specific method to insert a rule into a stylesheet — IE 4:
Synopsis
void addRule(Stringselector, Stringstyle, integerindex)
Arguments
-
selector The CSS selector for the rule.
-
style The styles to be applied to elements that match the
selector. This style string is a semicolon-delimited list of attribute:value pairs. It does not begin and end with curly braces.-
index The position in the
rulesarray at which the rule is to be inserted or appended. If this optional argument is omitted, the new rule is appended to the array of rules.
Description
This method inserts (or appends) a new CSS style rule at the
specified index of the rules array of this stylesheet. This is an
IE-specific alternative to the standard insertRule( ) method. Note that the
arguments to this method are different from those to insertRule( ).
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access