+ Start a Discussion
Sumit Budhiraja 9133Sumit Budhiraja 9133 

how to get Lightning Icon Dom in Componet Controller?

I am trying to get Lightning icon Dom but when I am trying through below code, It's giving undefined.
Please help how to get Dom of the lightning icon in the Component controller.

Code:
<aura:component >
    <ltng:require scripts="{!$Resource.jQuery + '/jquery.js'}" afterScriptsLoaded="{!c.scriptsLoaded}"/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />:
    <lightning:icon  iconName="action:approval" size="large" alternativeText="Indicates approval"/>
</aura:component>

Renderer Code:
({
    afterRender  : function(component,helper){
        component.superAfterRender();
        var svg = component.find("approval");
         console.log(svg);
         
        }
    
})User-added image