05 2026 · Browser security
Trusted Types Cheatsheet
A focused reference, playground, and set of polyfill notes for eliminating DOM XSS with Trusted Types.
- My role
- Author & researcher
- Project state
- Active reference · 2026
- Built with
- JavaScript
- Page updated
01 / Context
The problem
Trusted Types guidance is often fragmented across specifications, migration advice, browser APIs, and small examples that omit production trade-offs.
02 / Build
The approach
A single practical reference covering CSP rollout, policies, TrustedHTML, the Sanitizer API, Perfect Types, violations, and live playgrounds.
03 / Highlights
What is inside
- Report-only to enforcement
- Migration and safe-sink patterns
- Polyfill and tinyfill notes