WPT
wpt / trusted-types / TrustedTypePolicy-createXXX.html
Spec: Trusted Types ↗
Runs: Chrome 155.0.8038.0 (wpt@397d01d8e, 2026-09-02) | Firefox 157.0a1 (wpt@397d01d8e, 2026-09-02) | Safari 251 preview (wpt@5ce815a83, 2026-08-27) | Ladybird 1.0-5f6fa (wpt@b1a7025f8, 2026-09-02) | Servo Servo 0.5 (wpt@2ccd2cbf8, 2026-09-01) | Blitz 7727414ca (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 | 29/29 | 29/29 | 29/29 | 29/29 | 29/29 | NOT RUN |
| Subtest | Chrome | Firefox | Safari | Ladybird | Servo | Blitz |
|---|---|---|---|---|---|---|
| calling undefined callbacks throws | PASS | PASS | PASS | PASS | PASS | — |
| Attributes without type constraints will work as before. | PASS | PASS | PASS | PASS | PASS | — |
| trustedTypes.createPolicy(.., null) creates empty policy. | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedHTML0 (TrustedHTML: s => s) | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedHTML1 (TrustedHTML: s => null) | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedHTML2 (TrustedHTML: s => "well, " + s) | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedHTML3 (TrustedHTML: s => { throw new Error() }) | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedHTML4 (TrustedHTML: callback_to_capture_this(s) { return String(this); }) | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedHTML5 (TrustedHTML: s => { aGlobalVarForSideEffectTesting = s; return s }) | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedHTML6 (TrustedHTML: s => aGlobalVarForSideEffectTesting + s) | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedHTML7 (TrustedHTML: function () { [native code] }) | PASS | — | — | PASS | — | — |
| TestPolicyTrustedHTML8 (TrustedHTML: s => aGlobalFunction(s)) | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedScript0 (TrustedScript: s => s) | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedScript1 (TrustedScript: s => null) | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedScript2 (TrustedScript: s => "well, " + s) | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedScript3 (TrustedScript: s => { throw new Error() }) | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedScript4 (TrustedScript: callback_to_capture_this(s) { return String(this); }) | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedScript5 (TrustedScript: s => { aGlobalVarForSideEffectTesting = s; return s }) | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedScript6 (TrustedScript: s => aGlobalVarForSideEffectTesting + s) | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedScript7 (TrustedScript: function () { [native code] }) | PASS | — | — | PASS | — | — |
| TestPolicyTrustedScript8 (TrustedScript: s => aGlobalFunction(s)) | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedScriptURL0 (TrustedScriptURL: s => s) | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedScriptURL1 (TrustedScriptURL: s => null) | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedScriptURL2 (TrustedScriptURL: s => s + "#duck") | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedScriptURL3 (TrustedScriptURL: s => { throw new Error() }) | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedScriptURL4 (TrustedScriptURL: callback_to_capture_this(s) { return String(this); }) | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedScriptURL5 (TrustedScriptURL: s => s + "#" + aGlobalVarForSideEffectTesting) | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedScriptURL6 (TrustedScriptURL: function () { [native code] }) | PASS | — | — | PASS | — | — |
| TestPolicyTrustedScriptURL7 (TrustedScriptURL: s => anotherGlobalFunction(s)) | PASS | PASS | PASS | PASS | PASS | — |
| TestPolicyTrustedHTML7 (TrustedHTML: function() { [native code] }) | — | PASS | — | — | PASS | — |
| TestPolicyTrustedScript7 (TrustedScript: function() { [native code] }) | — | PASS | — | — | PASS | — |
| TestPolicyTrustedScriptURL6 (TrustedScriptURL: function() { [native code] }) | — | PASS | — | — | PASS | — |
| TestPolicyTrustedHTML7 (TrustedHTML: function aGlobalFunction() { [native code] }) | — | — | PASS | — | — | — |
| TestPolicyTrustedScript7 (TrustedScript: function aGlobalFunction() { [native code] }) | — | — | PASS | — | — | — |
| TestPolicyTrustedScriptURL6 (TrustedScriptURL: function anotherGlobalFunction() { [native code] }) | — | — | PASS | — | — | — |