SVG: Get clicked element

How to get the specific element inside SVG on which click was made? this.svgEl = document.createElementNS(‘’, ‘svg’); var s = Snap(this.svgEl); var svgFromApi = (new DOMParser()).parseFromString("svg image from API", "image/svg+xml"); s.clear(); s.append(svgFromApi.documentElement); this.divElementRef.nativeElement.appendChild(this.svgEl); this.svgElement.onclick = ()=> { //Need to get on which element inside SVG it was clicked. } >Solution : Try this this.svgEl.onclick =… Read More SVG: Get clicked element