Home
Search

Discussion

Discussion categories

General
Tech

Library

Library pages

Design
Resources
Websites
Articles
Web development
Cool Libraries
Tools
Resources
Papers and Studies
Articles
Language Models
Tech and Systems
Computers
Windows Tools and Modding
Windhawk
Raycast for Windows
Rainmeter
Vintage Computing Festival Berlin 2026
Plasma 6.7
Haiku: BeOS-Inspired Open-Source OS
Random fun stuff
Esoteric File Systems
Cool websites
Friends
Unity - Cheaterman's Bar
ChatGPT
Gentoo is Rice - Humor about Linux Obsession
Storyden
Selfh.st
OpenAlternative
Microlaunch
Peerlist
Glama.ai
AlternativeTo
Brandfetch
Dokploy
PitchHut
Piefed Social
Collections
Links
Members
Roles
RegisterLogin
Login
Discussion
Tech
Element: setHTML() method - Web APIs | MDN
southclaws's avatar

Southclaws

@southclaws


View profile
Copy link
  Report member
• 10mo
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.

Storyden developer.

userbar.png
0 likes0 replies

    Please sign up or log in to reply