title: Capturing clicks on all A tags using eventListener
body: <p>I'm trying to come up with a solution that will allow me to know whenever an "A" tag (or any other tag within an "A" tag) is clicked. </p>
  
  <p>For example:</p>
  
  <pre><code>&lt;a href="#"&gt;Link 1&lt;/a&gt;
  &lt;a href="#"&gt;&lt;span&gt;Link 2&lt;/span&gt;&lt;/a&gt;
  &lt;a href="#"&gt;&lt;img src="#"&gt;Link 3&lt;/img&gt;&lt;/a&gt;
  </code></pre>
  
  <p>So far I have this:</p>
  
  <pre><code>&lt;script&gt;
  document.getElementsByTagName("BODY")[0].addEventListener('click', function(e) {
  if(e.target &amp;&amp; e.target.tagName == "A") {
  console.log(e.target.text); }
  }, false);
  &lt;/script&gt;
  </code></pre>
  
  <p>This is returning the text for link 1, but not for links 2 and 3. I also do not want to get any text if someone clicks on span or img elements that dont have an anchor tag.</p>