How do i add custom attribute to my list control ?

Hi , I am using TwebListControl component and during its OnGetItemChildren event ,


i need to add the "custom" attribute , i.e. the data-popup=".add-task-popup"
      <li>
          <a href="" class="item-content add-task-link popup-open"  data-popup=".add-task-popup">
                   <div class="item-media"><i class="fa fa-plus""></i></div>
                       <div class="item-inner">
                           <div class="item-title">Add Task</div>
                       </div>
           </a>
      </li>

i have no issue to add those html code above in the rest of the list item above ,i only would like to find out is it possible to add the one mentioned OR more custom attribute to my link element ?

You can use

HTMLElement.setAttribute('attributename','value');