title: submit event does not fire if submit initiated programmatically
body: <p>I have a HTML form with button:</p>
  
  <pre><code>&lt;form action="/" method="post" id="MyForm"&gt;
  &lt;input type="hidden" name="Field1" value="Value1" /&gt;
  &lt;input type="hidden" name="Field2" value="Value2" /&gt;
  &lt;input type="submit" name="name" value="submit" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I have event handler for submit attached to Window:</p>
  
  <pre><code>window.onsubmit = function()
  {
      alert("Submit happening!");
  };
  </code></pre>
  
  <p>This event handler fires properly if I click "Submit" button.
  However events never works when submit is triggered programmatically from javascript:</p>
  
  <pre><code>$("#MyForm")[0].submit();
  </code></pre>
  
  <p>How to catch submit event handler when it was initiated by Javascript, not by User click?
  I tried to subscribe for Form event using Jquery or AddEventListener - does not work.</p>