Newer Version Available

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

Lightning Locker

LWR sites use an upgraded version of the Lightning Locker library that supports cross-namespace communication for Lightning web components, in addition to the usual security features Locker provides. Cross-namespace communication lets you import components from other namespaces and use them via composition or extension.

This upgraded version of the Lightning Locker library makes it easier to take advantage of third-party libraries, such as analytics and charting that work within your Lightning web components.

Also, interactions with global objects are no longer restricted. Because each namespace is given its own detached sandbox, we can expose document, window, and element globals directly without secure object wrappers. In turn, more standard DOM APIs can work successfully, and exposed APIs within your namespace behave the same as any web context without secure wrappers.

See Security with Lightning Locker in the Lightning Web Components Developer Guide.