How to use this reference
Editorial reasoning: check two things separately: that protected APIs accept only policy-created values, and that each policy enforces the rules needed for safe use. Limit which code can create policies. Review each policy together with the code and state it depends on, and avoid global state that can silently change its decisions. As the maintainer FAQ explains, having a sanitization library is not enough if the application does not consistently use it.
Before reading
- JavaScript DOM data flow and Content Security Policy
Context and limits
- The reviewed edition is a Working Draft, not a final W3C Recommendation. Krzysztof Kotowicz is its listed editor; Mike West is listed as former editor.
- Unsafe policies can preserve DOM injection risk. The design does not isolate actively malicious first-party code or guard every DOM operation.
- The FAQ distinguishes client-side sink controls from server-generated injection and complementary CSP defenses. Its 2021 browser-support discussion is historical and is not used as current compatibility evidence.
Sources
- Trusted TypesWorld Wide Web Consortium · reviewed 2026-10-03
- Trusted Types publication historyWorld Wide Web Consortium · reviewed 2026-10-03
- Trusted Types FAQW3C Trusted Types project · reviewed 2026-10-03
Record reviewed 2026-10-03. Snapshot af2809c308fc. Open the complete JSON contract.