Security with Lightning Locker

Lightning Locker provides component isolation and security that allows code from many sources to execute and interact using safe, standard APIs and event mechanisms. Lightning Locker has been the default security architecture for Lightning components. Lightning Web Security (LWS) is designed to make it easier for your components to use secure coding practices and aims to replace Lightning Locker. LWS started to replace Lightning Locker for Lightning web components initially in Spring ’22.