BASELINE NowYouCanUse.com
Limited Availability
id: sanitizer

Sanitizer API

The Document.parseHTML() static method and the setHTML() method of Element and ShadowRoot objects parse and insert HTML into the DOM in a way that can prevent cross-site scripting attacks. The Sanitizer API can customize the sanitization process.
Baseline Status: This feature is currently Limited and is missing in at least one major browser engine.
Desktop Browser Engine Support
Google Chrome
146
Supported
Mozilla Firefox
148
Supported
Apple Safari
Unsupported
Microsoft Edge
146
Supported
Mobile Browser Engine Support
Chrome Android
146
Firefox Android
148
Safari iOS
Specifications and References