Newly Available
Unsanitized HTML parsing
The
Document.parseHTMLUnsafe() static method parses HTML into a DOM tree, much like the setHTMLUnsafe() DOM method inserts HTML into an existing tree. No sanitization applies, so never call it with user-provided strings.
Baseline Status:
Achieved Newly Available on Sep 15, 2025 across core engines.
Desktop Browser Engine Support
Google Chrome
124
Supported
Mozilla Firefox
128
Supported
Apple Safari
26
Supported
Microsoft Edge
124
Supported
Mobile Browser Engine Support
Chrome Android
124
Firefox Android
128
Safari iOS
26
Specifications and References
MDN Browser Compat Data Keys:
id: parse-html-unsafe