setHTMLUnsafe

fun setHTMLUnsafe(html: TrustedHTML, options: SetHTMLUnsafeOptions = definedExternally)(source)
fun setHTMLUnsafe(html: String, options: SetHTMLUnsafeOptions = definedExternally)(source)

The setHTMLUnsafe() method of the Element interface is used to parse HTML input into a DocumentFragment, optionally filtering out unwanted elements and attributes, and those that don't belong in the context, and then using it to replace the element's subtree in the DOM.

MDN Reference