parseHTML

external fun parseHTML(html: String, options: SetHTMLOptions = definedExternally): Document(source)

The parseHTML() static method of the Document object provides an XSS-safe method to parse and sanitize a string of HTML in order to create a new Document instance.

MDN Reference