Get the latest tech news

Element: setHTML() method


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.

None

Get the Android app

Or read this on Hacker News

Read more on:

Photo of method

method

Photo of element

element

Photo of setHTML

setHTML

Related news:

News photo

Startup Battlefield company ÄIO invented a method to make edible fat from ag waste like sawdust

News photo

DeepSeek Debuts ‘Sparse Attention’ Next-Generation AI Model

News photo

Mollweide map projection and Newton's method