I'm trying to access the id assigned to the tag where where I'm calling the js method.
<ul>
<template for:each={errorList} for:item='objError'>
<li key={objError.Id}>
<a id={objError.Id} type={objError.type} class="slds-text-link_reset" onclick={handleErrorClick}>
<lightning-icon icon-name="utility:jump_to_bottom" size="xx-small" class="slds-p-right_small" alternative-text={objError.error}></lightning-icon>
{objError.error}
</a>
</li>
</template>
</ul>
JS :
handleErrorClick(event){
/* eslint-disable no-console */
console.log('event : ' ,event.target.Id);
}
How can I get the value held in the Id attribute.