title: "input" inside a "div": how to register an "onclick" event listener for the "div", but not for the "input"
body: <p>I have a <code>div</code> element, and inside of it an <code>input</code> element. I want to register an event listener when click on the <code>div</code>. It works ok, but the problem is: the "click" on the <code>input</code> is also detected, and I don't want to.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>document.getElementById("foo").addEventListener('click', function(event) {
    alert();
    event.stopPropagation();
  })</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>div {
    width: 300px;
    height: 300px;
    background-color: red;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="foo"&gt;
  &lt;input&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>