Browser-local does not mean standards-complete
HTML parsing is error tolerant. Source diagnostics, sandboxed previews, and transformations do not replace full conformance, security, or production-browser testing.
Removing tags creates text, not sanitized HTML
The result is plain text with script/style/template content excluded by the native engine. Do not treat tag stripping as a general sanitizer for later HTML injection.
Parser and sanitizer boundary
HTML DOMParser creates a detached document and may repair or normalize markup. That is useful for inspection, but parsing alone does not sanitize untrusted HTML. Review scripts, inline event attributes, embedded content and application-specific URL/context rules before any live-DOM insertion.