Newer Version Available
Lightning Web Security in LWR Sites
Instead of Lightning Locker, LWR sites in Experience Cloud use Lightning Web Security
(LWS), the new security architecture for Lightning web components. LWS supports cross-namespace
communication for Lightning web components, in addition to the usual security features that
Lightning Locker provides. Cross-namespace communication lets you import components from other
namespaces and use them via composition or extension.
Lightning Web Security 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 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 Lightning Web Security in the Lightning Web Components Developer Guide.