Newer Version Available
Developing Secure Code
The Lightning Locker architectural layer enhances security by isolating
individual Lightning namespaces in their own containers and enforcing coding best
practices. Lightning Web Security is designed to make it easier for your components
to use secure coding practices and aims to replace Lightning Locker over time. In
Setup, you can switch between using Lightning Web Security or Lightning
Locker.
The framework also uses JavaScript Strict mode to turn on native security features in the browser, and Content Security Policy (CSP) rules to control the source of content that can be loaded on a page.