The Lightning JavaScript API

In this chapter, we will dig deeper into the Lightning component rendering life cycle and its JavaScript API. The Lightning Component framework typically uses the ES5 version of JavaScript. However, some ES6 support is built in, including the use of Promises and, array functions. The Lightning component framework does not support all of the APIs in JavaScript ES5 specifications, due to security. Only APIs that are considered safe from a web security perspective are supported by the framework. Salesforce runs the custom JavaScript that we write in the helper, controller, or RENDERER files, through a service known as a locker service, which ensures that your JavaScript code is safe and compliant with security.

This chapter will start with the various system-specific JavaScript functions and APIs provided by the Lightning framework, and we will then dig deeper into its rendering cycle, followed by a section on Locker Services.

In this chapter, we will cover the following topics:

  • Setting attributes
  • Finding DOM elements using the find function
  • The Locker Service security model of Lightning Components
  • The Aura Localization Service
  • $A.util functions
  • Dynamically creating components using $A.createComponent()
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.107.152