blog-2025-10-23-sethtml

Thursday, October 23, 2025, 6:33:04 AM Coordinated Universal Time by stefs

The setHTML() method of the Element interface provides an XSS-safe method to parse and sanitize a string of HTML into a DocumentFragment, and then insert it into the DOM as a subtree of the element.

https://developer.mozilla.org/en-US/docs/Web/API/Element/setHTML

source


Thursday, October 23, 2025, 6:32:59 AM Coordinated Universal Time by stefs

The setHTML() method of the Element interface provides an XSS-safe method to parse and sanitize a string of HTML into a DocumentFragment, and then insert it into the DOM as a subtree of the element. https://developer.mozilla.org/en-US/docs/Web/API/Element/setHTML

source


view