insertRule

fun insertRule(rule: String, index: Int = definedExternally): Int(source)

The CSSStyleSheet.insertRule() method inserts a new CSS rule into the current style sheet.

MDN Reference