본문으로 건너뛰기

parseSanitizedElement

Parse an HTML string into elements with sanitization, used by setStatus to restore panels from a serialized html string. The string is parsed inside a <template> (an inert document, so no script runs and no resource loads), event-handler attributes and script-capable elements are stripped, and the result is imported — neutralizing a mutation-XSS payload revived by the outerHTML→innerHTML round-trip.

Signature​

parseSanitizedElement: (html: string) => HTMLElement[]