Newer Version Available

This content describes an older version of this product. View Latest

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 promotes best practices to improve the supportability of your code by allowing access only to supported APIs and eliminating access to non-published framework internals.

Lightning Locker is enabled for all Lightning components set to API version 40.0 and later. API version 40.0 corresponds to Summer ’17, when Lightning Locker was enabled for all orgs. Lightning Locker isn’t enabled for components with API version 39.0 and earlier.

You can disable Lightning Locker for a 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.

For information about working with Lightning Locker when developing Lightning components, see “What is Lightning Locker?” in the Lightning Component Developer Guide.

For information on preparing your Lightning components code for Lightning Locker enablement, see “Salesforce Lightning CLI (Deprecated).”