Newer Version Available
Lightning Locker in Communities
Lightning Locker is a powerful security architecture for Lightning components that
enhances security by isolating Lightning components in their own namespace. Lightning Locker
improves the supportability of your code by allowing access only to supported APIs and
eliminating access to non-published framework internals.
Lightning Locker in Communities
Lightning Locker is enabled by default for all new Lightning communities. However,
depending on your community’s CSP level, you can choose to turn off Lightning Locker for all
components in Experience Builder.
To learn more about disabling Lightning Locker and some design considerations to think about, see “CSP and Lightning Locker in Lightning Communities” in Salesforce Help.
You can also disable Lightning Locker for an individual Aura component by setting the component’s API version 39.0 or earlier. However, for consistency and ease of debugging, we recommend that you set the same API version for all components in your app, when possible.
Aura Components
If you’re developing Lightning web components, check out the following topics in the
Lightning Web Components Developer Guide.
- To learn about working with Lightning Locker when developing Aura components, see “What is Lightning Locker?”
- For information on preparing Aura components to use in a community with Lightning Locker enabled, see “Locker Console Overview.”
Lightning Web Components
If you’re developing Lightning web components, check out the following topics in the
Lightning Web Components Developer Guide.
- To learn about working with Lightning Locker when developing Lightning web components, see “Security with Lightning Locker.”
- For information on preparing Lightning web components to use in a community with Lightning Locker enabled, see “Lightning Locker Tools.”