index.js
function (eventType, params) {
    params = params || {
        bubbles: false,
        cancelable: false,
        ctrlKey: false,
        altKey: false,
        shiftKey: false,
        metaKey: false
      };
    var mouseEvent = document.createEvent('MouseEvent');
    mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, window, 0, 0, 0, 0, 0, params.ctrlKey, params.altKey, params.shiftKey, params.metaKey, 0, null);

    return mouseEvent;
  }
function (eventType, params) {
    params = params || {
        bubbles: false,
        cancelable: false,
        ctrlKey: false,
        altKey: false,
        shiftKey: false,
        metaKey: false
      };
    var mouseEvent = document.createEvent('MouseEvent');
    mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, window, 0, 0, 0, 0, 0, params.ctrlKey, params.altKey, params.shiftKey, params.metaKey, 0, null);

    return mouseEvent;
  }
function ( eventType , params ) { params = params || { bubbles : false , cancelable : false , ctrlKey : false , altKey : false , shiftKey : false , metaKey : false } ; var mouseEvent = document . createEvent ( 'MouseEvent' ) ; mouseEvent . initMouseEvent ( eventType , params . bubbles , params . cancelable , window , 0 , 0 , 0 , 0 , 0 , params . ctrlKey , params . altKey , params . shiftKey , params . metaKey , 0 , null ) ; return mouseEvent ; }
Polyfills DOM4 MouseEvent
Polyfills DOM4 MouseEvent