title: Javascript dispatchEvent - Why is it needed?
body: <p>I have code which is written:</p>
  
  <pre><code>window.addEventListener("orientationchange", function() {
      //code here;
  }, false);
  </code></pre>
  
  <p>And it works fine...but I am being told to add by the Mozilla dev page:</p>
  
  <pre><code>elem.dispatchEvent(event);
  </code></pre>
  
  <p>Can anyone tell me why I need to add the dispatch and why it is working without it (what the dispatch actually does would also be very useful!).</p>
  
  <p>W3C also recommends in the specification to remove an event when done with it, but for an orientation change it could happen at any time, is it OK to leave it there?</p>
  
  <p>Much obliged for any help.</p>