title: MouseEvent not working in Internet Explorer
body: <p>Is it me? Is it my IE? or why is this code not working on IE 11:</p>
  
  <pre><code>var clicker = new MouseEvent("click", {
    'bubbles': true,
    'cancelable': true,
    'view': window,
    'detail': 0,
    'screenX': 0,
    'screenY': 0,
    'clientX': 0,
    'clientY': 0,
    'ctrlKey': false,
    'altKey': false,
    'shiftKey': false,
    'metaKey': false,
    'button': 0,
    'relatedTarget': null
  });
  </code></pre>
  
  <p>I get "Object doesn't support this action" on the console (F12). I had to come up with a workaround, but I just don't get why is the previous code not working (by the way, the previous code comes from here: <a href="https://msdn.microsoft.com/en-us/library/ie/dn905219(v=vs.85).aspx" rel="nofollow noreferrer">https://msdn.microsoft.com/en-us/library/ie/dn905219(v=vs.85).aspx</a> (Creating and firing synthetic events).
  Workaround:</p>
  
  <pre><code>if (typeof MouseEvent !== 'function') {
      (function (){
          var _MouseEvent = window.MouseEvent;
          window.MouseEvent = function (type, dict){
              dict = dict || {};
              var event = document.createEvent('MouseEvents');
              event.initMouseEvent(
                      type,
                      (typeof dict.bubbles == 'undefined') ? true : !!dict.bubbles,
                      (typeof dict.cancelable == 'undefined') ? false : !!dict.cancelable,
                      dict.view || window,
                      dict.detail | 0,
                      dict.screenX | 0,
                      dict.screenY | 0,
                      dict.clientX | 0,
                      dict.clientY | 0,
                      !!dict.ctrlKey,
                      !!dict.altKey,
                      !!dict.shiftKey,
                      !!dict.metaKey,
                      dict.button | 0,
                      dict.relatedTarget || null
              );
              return event;
          }
      })();
  }
  </code></pre>
  
  <p>The deal is that I want to migrate the deprecated createEvent/initXXXXEvent to the new form (var event = new XXXXEvent(...) ) whenever possible and not rely on the deprecated methods.</p>