function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Tyler HarrisTyler Harris 

What does attribute 'data-aura-rendered-by' do exactly?

I'm noticing when I use the Lightning Design System it's tacking on a aura class and a 'data-aura-rendered-by' attribute. What does this do?

Thanks.
Khemanshu RaoKhemanshu Rao
Hi Tyler, did you get the answer. My lightning component is not working on community due to this 'data-aura-rendered-by' attribute. Correct value is not set for this attribute on community but in internal salesforce it is working fine.
If I inspect lightning button from
Internal user it is like: <button class="slds-button slds-button--neutral btn btn-default btn-xs pull-right" type="button" data-aura-rendered-by="1429:0"><!--render facet: 1430:0-->Add Reason Code<!--render facet: 1433:0--></button>

External user it is like: <button class="slds-button slds-button--neutral btn btn-default btn-xs pull-right" type="button" data-aura-rendered-by="function r(f){/in/.test(document.readyState)?setTimeout('r('+f+')',9):f()}"><!--render facet: 1407:0-->Add Reason Code<!--render facet: 1410:0--></button>

Please give reply if you have experienced the same.
Adelchi PelizzoAdelchi Pelizzo
This is what I am dealing with, in lightning console :
<td class="slds-pill__label" data-value="this" style="background-color: rgb(46, 255, 66); padding: 2px 5px; cursor: pointer; font-weight: bold; color: rgb(255, 255, 255);" data-aura-rendered-by="2:2975;a">3rd Follow Up</td>
 
<td class="slds-pill__label" data-value="this" style="background-color: rgb(46, 255, 66); padding: 2px 5px; cursor: pointer; font-weight: bold; color: rgb(255, 255, 255);" data-aura-rendered-by="5:1097;a">3rd Follow Up</td>
First element belong to tab0.
Second element belong to tab1.
Both are present in the dom but only one is rendered by clicking on its console tab.
I need to identify only rendered elements.
 
AmandaByrnePBOAmandaByrnePBO
Me Too! I am trying to target specific CSS selectors, but I need to make them conditional on the data results.
I can find plenty of resources that discuss the rendering as seen in the Developers Console, but can't find anything about what those numbers mean on the other side. 
I suspect the first number may be a line reference in the code? which could change based on the size of the data returned
The second number does seem to stay the same for the data element consistently, but does not always seem to stay the same on re-publishing or reloading.
The 'a' seems to reference a variable returned by either a javascript or the lightning component.
And this might be fine for me to assign an attribute to my CSS selector, but I have to verify that one of the numbers will stay the same!
<h1 class="slds-page-header__title" data-aura-rendered-by="26:2;a">
Create Ticket
</h1>
<span data-aura-rendered-by="29:2;a"></span>