setHTML

open external fun setHTML(html: String, options: SetHTMLOptions = definedExternally)(source)

The setHTML() method of the ShadowRoot interface provides an XSS-safe method to parse and sanitize a string of HTML, which then replaces the existing tree in the Shadow DOM.

MDN Reference