Add event listener on SVG element

I was facing problem while adding event listener to an svg element.

Then I added event listeners to both svg and path tags, and it worked.

By Abhineet Mittal

Abhineet is IIM Alumnus and Founder of popular Digital Publishing Platform, Sahityapedia. He is a technology enthusiast by hobby & an avid reader.