replace

suspend fun replace(text: String): CSSStyleSheet(source)

The replace() method of the CSSStyleSheet interface asynchronously replaces the content of the stylesheet with the content passed into it.

MDN Reference