I was reading your post: https://www.kirupa.com/html5/handling_events_for_many_elements.htm
Comments were closed but I had a question I’m hoping the community can help me with.
When someone wants to implement analytics tracking on their site, you implement something like Google Tag Manager. For each item that you listen for you configure it separately and it launches a listener. In some cases, there are dozens of listeners being fired on the page. So my question is:
Can anyone validate the fact that having multiple listeners uses up more resources/memory or present any issues that should not be? ( performance issues? )
If you launch a single listener that listens for a single event, such as “click” and then passes the event.target through a series of conditionals in order to take action if the item clicked is something identified as a “trackable” item, would this solution introduce any issues? is it better than firing independent listeners?