Search Ask

Makeroom

RegisterLogin

Discussion

General
Tech
Photos

Library

Chevron Right Icon
Design
Resources
Websites
Chevron Right Icon
Web development
Cool Libraries
Tools
Resources
Papers and Studies
Language Models
Chevron Right Icon
Random fun stuff
Esoteric File Systems
Cool websites
Chevron Right Icon
Storyden
Selfh.st
OpenAlternative
Microlaunch
Peerlist
Glama.ai
AlternativeTo
Brandfetch
PitchHut
 Collections Links Members

Element: setHTML() method - Web APIs | MDN

A new JS/HTML feature on the horizon! This allows for safer injection of HTML at runtime in the browser via JavaScript.

ID
d3sk3q7bd8ts23a0khg0
author
southclaws's avatar

Southclaws

@southclaws


View profile
Copy link
  Report member
started
Oct 22, 2025
replies
0
participating
No

scroll to top

powered by storyden

Login
Discussion
Tech
Element: setHTML() method - Web APIs | MDN
southclaws's avatar

Southclaws

@southclaws


View profile
Copy link
  Report member
• 2d
Tech

Element: setHTML() method - Web APIs | MDN

Element: setHTML() method - Web APIs | MDN

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.

developer.mozilla.org

A new JS/HTML feature on the horizon! This allows for safer injection of HTML at runtime in the browser via JavaScript.

You have not replied to this thread0 replies

    Please sign up or log in to reply