Supported JavaScript

To develop Lightning web components, use the latest versions of JavaScript.

LWC supports the same browsers as Lightning Experience—the latest stable versions of Edge, Chrome, Firefox, and Safari. To develop Lightning web components for these browsers, you can use any JavaScript feature that the browser supports and that Lightning Locker allows.

Lightning Locker provides component isolation and security that allows code from many sources to execute and interact using safe, standard APIs and event mechanisms. To write code that’s compatible with Locker, use Locker tools.

Lightning Web Security (LWS) is an alternative to Lightning Locker for Lightning web components. LWS is intended to replace Lightning Locker over several releases. For more information, see Lightning Web Security.

To learn JavaScript (or if you want a refresher), start with the Modern JavaScript Development Trailhead module.

This developer guide explains how to develop Lightning web components and documents the LWC-specific JavaScript functions, such as for wire adapters that let you work with Salesforce data.

This developer guide doesn’t document standard JavaScript or teach JavaScript fundamentals. Standard JavaScript is documented in the Mozilla Developer Network (MDN) JavaScript Reference. If you’re looking for documentation for a function, try MDN first. For example, if you’re looking for information about addEventListener(), use MDN.

Salesforce ended support for Internet Explorer 11 on January 1, 2023. After Winter '24, you can no longer use Internet Explorer 11 and other legacy browsers to view or access Lightning Experience.

See Also