02Chapter 2: How LWS isolates code by namespaceThis chapter assumes you can read a Lightning web component (HTML template, JavaScript class, metadata file), that you know modern JavaScript, and that you know the browser's same-origin policy. It also assumes you know what a Salesforce namespace is. It covers the isolation boundary LWS draws. Late3 min read
03Chapter 3: Sandboxes and distortions: how LWS changes what code can doThis chapter assumes you can write a basic Lightning web component and know modern JavaScript (classes, modules, async/await). It also assumes you know that LWS isolates code by namespace, which the previous chapter covered. Here you will see the mechanism that enforces that isolation and how it cha3 min read
04Chapter 4: Lightning Locker compared with LWSThis chapter assumes you know the basic structure of a Lightning web component, modern JavaScript (modules, classes, async/await), the same-origin policy, and what a Salesforce namespace and a static resource are. It also assumes you have read the earlier chapters on namespace isolation and on sandb3 min read
05Chapter 5: Enabling LWS in your orgThis chapter assumes you can build a basic Lightning web component (HTML template, JavaScript class, metadata file). It also assumes you know what a namespace is and have used static resources. You should have read the earlier chapters on namespace isolation, sandboxes and distortions, and the compa3 min read
06Chapter 6: DOM access: what your component can reachThis chapter assumes you can build a basic Lightning web component (HTML template, JavaScript class, metadata file). It also assumes you know modern JavaScript and the idea of the same-origin policy. You should already know that Lightning Web Security (LWS) isolates code by namespace. Here you will 3 min read
07Chapter 7: Standard JavaScript and web APIs under LWSThis chapter assumes you can write a basic Lightning web component and use async/await. It also assumes you know what a namespace is and that LWS isolates code by namespace, as covered earlier in this tutorial. Here you will see which standard APIs work as usual and which behave differently, and how3 min read
08Chapter 8: Sharing data across namespaces with public properties and eventsThis chapter assumes you know basic Lightning web component structure, modern JavaScript (modules, classes), and how Salesforce namespaces and static resources work. It also assumes you have read the earlier chapters on namespace isolation and DOM access.3 min read
09Chapter 9: Using third-party libraries from static resourcesThis chapter assumes you know basic LWC structure, async/await, and what a static resource is. You also need the idea from earlier chapters that LWS runs code in a sandbox per namespace and applies distortions to some APIs.3 min read
10Chapter 10: Content Security Policy and LWSThis chapter assumes you know basic LWC structure, async/await, and what an HTTP request to a third-party host looks like. It also assumes you have read the earlier chapters on sandboxes, DOM access, and static resource libraries.2 min read
11Chapter 11: Migrating from Locker to LWSThis chapter assumes you know basic Lightning web component structure, modern JavaScript, and what a namespace sandbox is. It also assumes you have read the earlier chapters on how Lightning Locker and Lightning Web Security (LWS) differ and how to enable LWS. The goal here is a safe, staged migrati3 min read
12Chapter 12: Troubleshooting LWS errorsThis chapter assumes you know how LWS isolates code by namespace, how distortions change standard APIs, and how to load static resources with loadScript. It gives you a repeatable way to find the cause of an LWS failure and decide whether to change your code or replace a library.3 min read