Angular · Senior · Question 59 of 75
What does Angular's Trusted Types support help with?
- ✓Correct answer: Enforcing in the browser that only sanitized or explicitly trusted values reach dangerous DOM sinks like
innerHTML - 2Type-checking templates at compile time
- 3Encrypting data in
localStorage
Explanation
With a require-trusted-types-for 'script' CSP, raw string assignments to sinks fail, so any XSS bypass in custom code becomes visible.