WPT
wpt / trusted-types / script-enforcement-001.html
Spec: Trusted Types ↗
Runs: Chrome 155.0.8039.0 (wpt@ffab1bde3, 2026-09-03) | Firefox 157.0a1 (wpt@5e776f019, 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 a50cb8971 (wpt@a95401e4e, 2026-09-03)
View on the Blitz WPT dashboard | Open test on wpt.live | wpt.fyi
| Chrome | Firefox | Safari | Ladybird | Servo | Blitz | |
|---|---|---|---|---|---|---|
| Total | 35/35 | 35/35 | 33/35 | 34/35 | 35/35 | NOT RUN |
| Subtest | Chrome | Firefox | Safari | Ladybird | Servo | Blitz |
|---|---|---|---|---|---|---|
| The HTMLScriptElement is initially trusted. | PASS | PASS | PASS | PASS | PASS | — |
| Script source set via TrustedScript sink HTMLScriptElement.innerText keeps trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Script source set via HTMLElement.innerText drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Script source set via TrustedScript sink HTMLScriptElement.textContent keeps trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Script source set Node.textContent drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Script source set via TrustedScript sink HTMLScriptElement.text keeps trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Script source set via TrustedHTML sink Element.innerHTML drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Script source set via TrustedHTML sink Element.setHTMLUnsafe() drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Script source cannot be set via Element.setHTML(). | PASS | PASS | — | — | PASS | — |
| Splitting script source via Text.splitText() keeps trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Normalizing script source via Element.normalize() keeps trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Script source set via Node.nodeValue drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Setting script source via CharacterData.data drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Setting script source via CharacterData.appendData() drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Setting script source via CharacterData.insertData() drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Setting script source via CharacterData.replaceData() drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Setting script source via CharacterData.deleteData() drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Setting script source via CharacterData.before() drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Setting script source via CharacterData.after() drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Setting script source via CharacterData.remove() drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Setting script source via CharacterData.replaceWith() drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Setting script source via Node.appendChild() drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Setting script source via Node.insertBefore() drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Setting script source via Node.replaceChild() drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Setting script source via Node.removeChild() drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Setting script source via Element.prepend() drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Setting script source via Element.append() drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Setting script source via Element.replaceChildren() drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Setting script source via Element.moveBefore() drops trustworthiness. | PASS | PASS | FAIL | PASS | PASS | — |
| Setting script source via TrustedHTML sink Node.insertAdjacentHTML() drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Setting script source via Node.insertAdjacentText() drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Setting script source via Range.insertNode() drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Setting script source via Range.deleteContents() drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Cloning a script via Node.cloneNode() drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |
| Cloning a script via Range.cloneContents() drops trustworthiness. | PASS | PASS | PASS | PASS | PASS | — |