Adds a new CSS rule to the stylesheet.
Method of css/cssom/styleSheetcss/cssom/styleSheet
Syntaxvar index = stylesheet.insertRule(ruleText, index);
Parameters ruleText
The at-identifier ("@rule_name") and the rule content.
indexThe 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.
Return ValueReturns an object of type NumberNumber
The newly inserted rule’s index within the style sheet’s rule list.
NotesAfter the new rule has been inserted, it becomes part of the cascade.
Related specificationsReference
Microsoft Developer Network: [Windows Internet Explorer API reference Article]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4