WPT
wpt / sanitizer-api / sethtml-with-trustedtypes.tentative.html
Spec: HTML Sanitizer API ↗
Runs: Chrome 155.0.8039.0 (wpt@a4fcd77aa, 2026-09-03) | Firefox 157.0a1 (wpt@cc4d45aa0, 2026-09-03) | Safari 251 preview (wpt@5ce815a83, 2026-08-27) | Ladybird 1.0-a9df8 (wpt@9b4cabf6d, 2026-09-03) | Servo Servo 0.6 (wpt@7e3d005d7, 2026-09-03) | Blitz 188486089 (wpt@a95401e4e, 2026-09-02)
View on the Blitz WPT dashboard | Open test on wpt.live | wpt.fyi
| Chrome | Firefox | Safari | Ladybird | Servo | Blitz | |
|---|---|---|---|---|---|---|
| Total | 151/151 | 45/151 | 56/151 | 44/151 | 45/151 | NOT RUN |
| Subtest | Chrome | Firefox | Safari | Ladybird | Servo | Blitz |
|---|---|---|---|---|---|---|
| ShadowRoot.setHTMLUnsafe: createParserOptions can inject a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot.setHTMLUnsafe: createParserOptions can inject a sanitizer | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot.setHTMLUnsafe: createParserOptions can override a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot.setHTMLUnsafe: createParserOptions can remove a sanitizer | PASS | PASS | PASS | PASS | PASS | — |
| ShadowRoot.setHTMLUnsafe: createParserOptions returning null succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| ShadowRoot.setHTMLUnsafe: createParserOptions returning undefined succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| ShadowRoot.setHTMLUnsafe: createParserOptions returning 0 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot.setHTMLUnsafe: createParserOptions returning 123 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot.setHTMLUnsafe: createParserOptions returning "foo" fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot.innerHTML: createParserOptions can inject a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot.innerHTML: createParserOptions can inject a sanitizer | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot.innerHTML: createParserOptions can override a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot.innerHTML: createParserOptions can remove a sanitizer | PASS | PASS | PASS | PASS | PASS | — |
| ShadowRoot.innerHTML: createParserOptions returning null succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| ShadowRoot.innerHTML: createParserOptions returning undefined succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| ShadowRoot.innerHTML: createParserOptions returning 0 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot.innerHTML: createParserOptions returning 123 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot.innerHTML: createParserOptions returning "foo" fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot.beforebegin: createParserOptions can inject a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot.beforebegin: createParserOptions can inject a sanitizer | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot.beforebegin: createParserOptions can override a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot.beforebegin: createParserOptions can remove a sanitizer | PASS | PASS | PASS | PASS | PASS | — |
| ShadowRoot.beforebegin: createParserOptions returning null succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| ShadowRoot.beforebegin: createParserOptions returning undefined succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| ShadowRoot.beforebegin: createParserOptions returning 0 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot.beforebegin: createParserOptions returning 123 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot.beforebegin: createParserOptions returning "foo" fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot.afterend: createParserOptions can inject a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot.afterend: createParserOptions can inject a sanitizer | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot.afterend: createParserOptions can override a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot.afterend: createParserOptions can remove a sanitizer | PASS | PASS | PASS | PASS | PASS | — |
| ShadowRoot.afterend: createParserOptions returning null succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| ShadowRoot.afterend: createParserOptions returning undefined succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| ShadowRoot.afterend: createParserOptions returning 0 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot.afterend: createParserOptions returning 123 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot.afterend: createParserOptions returning "foo" fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| ShadowRoot: createParserOptions can override runScripts | PASS | PASS | PASS | PASS | PASS | — |
| ShadowRoot: createParserOptions cannot change runScripts from false to true | PASS | PASS | PASS | PASS | PASS | — |
| ShadowRoot.setHTMLUnsafe: createParserOptions with sanitizer prevents createHTML from running | PASS | FAIL | — | FAIL | FAIL | — |
| ShadowRoot: createParserOptions cannot add unsafe elements to safe HTML setting | PASS | PASS | FAIL | FAIL | PASS | — |
| ShadowRoot.setHTMLUnsafe: exception in createParserOptions is rethrown and prevents createHTML | PASS | FAIL | — | FAIL | FAIL | — |
| ShadowRoot.setHTMLUnsafe: exception in createHTML happens after createParserOptions runs | PASS | FAIL | — | FAIL | FAIL | — |
| ShadowRoot.innerHTML: exception in createParserOptions is rethrown and prevents createHTML | PASS | FAIL | — | FAIL | FAIL | — |
| ShadowRoot.innerHTML: exception in createHTML happens after createParserOptions runs | PASS | FAIL | — | FAIL | FAIL | — |
| ShadowRoot.beforebegin: exception in createParserOptions is rethrown and prevents createHTML | PASS | FAIL | — | FAIL | FAIL | — |
| ShadowRoot.beforebegin: exception in createHTML happens after createParserOptions runs | PASS | FAIL | — | FAIL | FAIL | — |
| ShadowRoot.afterend: exception in createParserOptions is rethrown and prevents createHTML | PASS | FAIL | — | FAIL | FAIL | — |
| ShadowRoot.afterend: exception in createHTML happens after createParserOptions runs | PASS | FAIL | — | FAIL | FAIL | — |
| Element.setHTMLUnsafe: createParserOptions can inject a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.setHTMLUnsafe: createParserOptions can inject a sanitizer | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.setHTMLUnsafe: createParserOptions can override a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.setHTMLUnsafe: createParserOptions can remove a sanitizer | PASS | PASS | PASS | PASS | PASS | — |
| Element.setHTMLUnsafe: createParserOptions returning null succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| Element.setHTMLUnsafe: createParserOptions returning undefined succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| Element.setHTMLUnsafe: createParserOptions returning 0 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.setHTMLUnsafe: createParserOptions returning 123 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.setHTMLUnsafe: createParserOptions returning "foo" fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.innerHTML: createParserOptions can inject a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.innerHTML: createParserOptions can inject a sanitizer | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.innerHTML: createParserOptions can override a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.innerHTML: createParserOptions can remove a sanitizer | PASS | PASS | PASS | PASS | PASS | — |
| Element.innerHTML: createParserOptions returning null succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| Element.innerHTML: createParserOptions returning undefined succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| Element.innerHTML: createParserOptions returning 0 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.innerHTML: createParserOptions returning 123 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.innerHTML: createParserOptions returning "foo" fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.outerHTML: createParserOptions can inject a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.outerHTML: createParserOptions can inject a sanitizer | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.outerHTML: createParserOptions can override a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.outerHTML: createParserOptions can remove a sanitizer | PASS | PASS | PASS | PASS | PASS | — |
| Element.outerHTML: createParserOptions returning null succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| Element.outerHTML: createParserOptions returning undefined succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| Element.outerHTML: createParserOptions returning 0 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.outerHTML: createParserOptions returning 123 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.outerHTML: createParserOptions returning "foo" fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.createContextualFragment: createParserOptions can inject a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.createContextualFragment: createParserOptions can inject a sanitizer | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.createContextualFragment: createParserOptions can override a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.createContextualFragment: createParserOptions can remove a sanitizer | PASS | PASS | PASS | PASS | PASS | — |
| Element.createContextualFragment: createParserOptions returning null succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| Element.createContextualFragment: createParserOptions returning undefined succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| Element.createContextualFragment: createParserOptions returning 0 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.createContextualFragment: createParserOptions returning 123 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.createContextualFragment: createParserOptions returning "foo" fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.afterbegin: createParserOptions can inject a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.afterbegin: createParserOptions can inject a sanitizer | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.afterbegin: createParserOptions can override a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.afterbegin: createParserOptions can remove a sanitizer | PASS | PASS | PASS | PASS | PASS | — |
| Element.afterbegin: createParserOptions returning null succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| Element.afterbegin: createParserOptions returning undefined succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| Element.afterbegin: createParserOptions returning 0 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.afterbegin: createParserOptions returning 123 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.afterbegin: createParserOptions returning "foo" fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.beforeend: createParserOptions can inject a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.beforeend: createParserOptions can inject a sanitizer | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.beforeend: createParserOptions can override a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.beforeend: createParserOptions can remove a sanitizer | PASS | PASS | PASS | PASS | PASS | — |
| Element.beforeend: createParserOptions returning null succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| Element.beforeend: createParserOptions returning undefined succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| Element.beforeend: createParserOptions returning 0 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.beforeend: createParserOptions returning 123 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.beforeend: createParserOptions returning "foo" fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.beforebegin: createParserOptions can inject a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.beforebegin: createParserOptions can inject a sanitizer | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.beforebegin: createParserOptions can override a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.beforebegin: createParserOptions can remove a sanitizer | PASS | PASS | PASS | PASS | PASS | — |
| Element.beforebegin: createParserOptions returning null succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| Element.beforebegin: createParserOptions returning undefined succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| Element.beforebegin: createParserOptions returning 0 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.beforebegin: createParserOptions returning 123 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.beforebegin: createParserOptions returning "foo" fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.afterend: createParserOptions can inject a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.afterend: createParserOptions can inject a sanitizer | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.afterend: createParserOptions can override a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.afterend: createParserOptions can remove a sanitizer | PASS | PASS | PASS | PASS | PASS | — |
| Element.afterend: createParserOptions returning null succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| Element.afterend: createParserOptions returning undefined succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| Element.afterend: createParserOptions returning 0 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.afterend: createParserOptions returning 123 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.afterend: createParserOptions returning "foo" fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.parseHTMLUnsafe: createParserOptions can inject a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.parseHTMLUnsafe: createParserOptions can inject a sanitizer | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.parseHTMLUnsafe: createParserOptions can override a sanitizer config | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.parseHTMLUnsafe: createParserOptions can remove a sanitizer | PASS | FAIL | PASS | PASS | FAIL | — |
| Element.parseHTMLUnsafe: createParserOptions returning null succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| Element.parseHTMLUnsafe: createParserOptions returning undefined succeeds and skips sanitization | PASS | PASS | PASS | PASS | PASS | — |
| Element.parseHTMLUnsafe: createParserOptions returning 0 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.parseHTMLUnsafe: createParserOptions returning 123 fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element.parseHTMLUnsafe: createParserOptions returning "foo" fails | PASS | FAIL | FAIL | FAIL | FAIL | — |
| Element: createParserOptions can override runScripts | PASS | PASS | PASS | PASS | PASS | — |
| Element: createParserOptions cannot change runScripts from false to true | PASS | PASS | PASS | PASS | PASS | — |
| Element: createContextualFragment with createParserOptions(runScripts=false) does not run scripts | PASS | FAIL | FAIL | PASS | FAIL | — |
| Element: createContextualFragment runs scripts by default | PASS | PASS | PASS | FAIL | PASS | — |
| Element.setHTMLUnsafe: createParserOptions with sanitizer prevents createHTML from running | PASS | FAIL | — | FAIL | FAIL | — |
| Element: createParserOptions cannot add unsafe elements to safe HTML setting | PASS | PASS | FAIL | FAIL | PASS | — |
| Element.setHTMLUnsafe: exception in createParserOptions is rethrown and prevents createHTML | PASS | FAIL | — | FAIL | FAIL | — |
| Element.setHTMLUnsafe: exception in createHTML happens after createParserOptions runs | PASS | FAIL | — | FAIL | FAIL | — |
| Element.innerHTML: exception in createParserOptions is rethrown and prevents createHTML | PASS | FAIL | — | FAIL | FAIL | — |
| Element.innerHTML: exception in createHTML happens after createParserOptions runs | PASS | FAIL | — | FAIL | FAIL | — |
| Element.outerHTML: exception in createParserOptions is rethrown and prevents createHTML | PASS | FAIL | — | FAIL | FAIL | — |
| Element.outerHTML: exception in createHTML happens after createParserOptions runs | PASS | FAIL | — | FAIL | FAIL | — |
| Element.createContextualFragment: exception in createParserOptions is rethrown and prevents createHTML | PASS | FAIL | — | FAIL | FAIL | — |
| Element.createContextualFragment: exception in createHTML happens after createParserOptions runs | PASS | FAIL | — | FAIL | FAIL | — |
| Element.afterbegin: exception in createParserOptions is rethrown and prevents createHTML | PASS | FAIL | — | FAIL | FAIL | — |
| Element.afterbegin: exception in createHTML happens after createParserOptions runs | PASS | FAIL | — | FAIL | FAIL | — |
| Element.beforeend: exception in createParserOptions is rethrown and prevents createHTML | PASS | FAIL | — | FAIL | FAIL | — |
| Element.beforeend: exception in createHTML happens after createParserOptions runs | PASS | FAIL | — | FAIL | FAIL | — |
| Element.beforebegin: exception in createParserOptions is rethrown and prevents createHTML | PASS | FAIL | — | FAIL | FAIL | — |
| Element.beforebegin: exception in createHTML happens after createParserOptions runs | PASS | FAIL | — | FAIL | FAIL | — |
| Element.afterend: exception in createParserOptions is rethrown and prevents createHTML | PASS | FAIL | — | FAIL | FAIL | — |
| Element.afterend: exception in createHTML happens after createParserOptions runs | PASS | FAIL | — | FAIL | FAIL | — |
| ShadowRoot.setHTMLUnsafe: createParserOptions works after createHTML | — | — | FAIL | — | — | — |
| ShadowRoot.setHTMLUnsafe: exception in createParserOptions is rethrown | — | — | FAIL | — | — | — |
| ShadowRoot.setHTMLUnsafe: exception in createHTML prevents createParserOptions from running | — | — | PASS | — | — | — |
| ShadowRoot.innerHTML: exception in createParserOptions is rethrown | — | — | FAIL | — | — | — |
| ShadowRoot.innerHTML: exception in createHTML prevents createParserOptions from running | — | — | PASS | — | — | — |
| ShadowRoot.beforebegin: exception in createParserOptions is rethrown | — | — | FAIL | — | — | — |
| ShadowRoot.beforebegin: exception in createHTML prevents createParserOptions from running | — | — | PASS | — | — | — |
| ShadowRoot.afterend: exception in createParserOptions is rethrown | — | — | FAIL | — | — | — |
| ShadowRoot.afterend: exception in createHTML prevents createParserOptions from running | — | — | PASS | — | — | — |
| Element.setHTMLUnsafe: createParserOptions works after createHTML | — | — | FAIL | — | — | — |
| Element.setHTMLUnsafe: exception in createParserOptions is rethrown | — | — | FAIL | — | — | — |
| Element.setHTMLUnsafe: exception in createHTML prevents createParserOptions from running | — | — | PASS | — | — | — |
| Element.innerHTML: exception in createParserOptions is rethrown | — | — | FAIL | — | — | — |
| Element.innerHTML: exception in createHTML prevents createParserOptions from running | — | — | PASS | — | — | — |
| Element.outerHTML: exception in createParserOptions is rethrown | — | — | FAIL | — | — | — |
| Element.outerHTML: exception in createHTML prevents createParserOptions from running | — | — | PASS | — | — | — |
| Element.createContextualFragment: exception in createParserOptions is rethrown | — | — | FAIL | — | — | — |
| Element.createContextualFragment: exception in createHTML prevents createParserOptions from running | — | — | PASS | — | — | — |
| Element.afterbegin: exception in createParserOptions is rethrown | — | — | FAIL | — | — | — |
| Element.afterbegin: exception in createHTML prevents createParserOptions from running | — | — | PASS | — | — | — |
| Element.beforeend: exception in createParserOptions is rethrown | — | — | FAIL | — | — | — |
| Element.beforeend: exception in createHTML prevents createParserOptions from running | — | — | PASS | — | — | — |
| Element.beforebegin: exception in createParserOptions is rethrown | — | — | FAIL | — | — | — |
| Element.beforebegin: exception in createHTML prevents createParserOptions from running | — | — | PASS | — | — | — |
| Element.afterend: exception in createParserOptions is rethrown | — | — | FAIL | — | — | — |
| Element.afterend: exception in createHTML prevents createParserOptions from running | — | — | PASS | — | — | — |