title: How to prevent default on form submit?
body: <p>If I do this I can prevent default on form submit just fine:</p>
  
  <pre><code>document.getElementById('my-form').onsubmit(function(e) {
     e.preventDefault();
     // do something
  });
  </code></pre>
  
  <p>But since I am organizing my code in a modular way I am handling events like this:</p>
  
  <pre><code>document.getElementById('my-form').addEventListener('onsubmit', my_func);
  
  var my_func = function() {
     // HOW DO I PREVENT DEFAULT HERE???
     // do something
  }
  </code></pre>
  
  <p>How can I prevent default now?</p>