This section describes a few commands that you can run in the browser console to inspect the DOM and get its attribute values. Let's take a look at them with the help of an example:
- Clicking on the component and executing $auraTemp+"" in the Chrome developer Console shows the component.
- $auraTemp.getElement() shows the actual DOM elements of the components.
- To inspect the component by opening the console, use inspect($auraTemp.getElement()). This will navigate you to the Chrome console directly and select the DOM element for inspection.
- To get the attribute values that are on the component, run the following command in the Developer Console:
$auraTemp.get("v.attributeName");//Note that here attributeName is the name of the attribute that is declared in the component markup
- The following screenshot shows the display in the Developer Console if we select the youtubesearch component and execute the $auraTemp commands we discussed already: