title: JavaScript, stop additional event listeners
body: <p>Imagine I have this code:</p>
  
  <pre><code>var myFunc1 = function(event) {
      alert(1);
  }
  var myFunc2 = function(event) {
      alert(2);
  }
  
  element.addEventListener('click', myFunc1);
  element.addEventListener('click', myFunc2);
  </code></pre>
  
  <p>When the click event is fired myFunc1 is called, then myFunc2. But how do I (if at all possible) stop myFunc2 from being called if some condition in myFunc1 is met? <code> event.stopPropagation()</code> is not the solution, as this is not an event capturing/bubbling problem.</p>
  
  <p>Thanks.</p>