JavaScript · Senior · Question 66 of 75
What do Trusted Types enforce?
- ✓Correct answer: Dangerous sinks like
innerHTMLaccept only values created by an approved policy, not raw strings - 2All network requests must use HTTPS
- 3TypeScript types are checked at runtime
Explanation
Enabled via CSP require-trusted-types-for 'script', they turn DOM XSS into a reviewable set of policies. Frameworks like Angular support them.