title: Adding an event listener to an element that doesn't exist yet in vanilla javascript
body: <p>In JQuery I can do: </p>
  
  <pre><code>$(document).on("click","a.someBtn",function(e){
      console.log("hi");
  });
  </code></pre>
  
  <p>to add an event listener to an element that doesn't exist yet. I cannot seem to figure out how to add an event listener to an element that does not exist yet in vanilla javascript. <br/>
  The following does not work obviously: </p>
  
  <pre><code>query.addEventListener( "click", someListener );
  </code></pre>
  
  <p><strong>Edit</strong></p>
  
  <p>What I would like to do is compare the item by query selectors. I am selecting the element that does not exist yet with <code>querySelectorAll</code>. It is a little more dynamic than just checking the tag name.  </p>