code: function(target, type, options){
  
              options = options || {};
  
              if (mouseEvents[type]){
                  simulateMouseEvent(target, type, options.bubbles,
                      options.cancelable, options.view, options.detail, options.screenX,
                      options.screenY, options.clientX, options.clientY, options.ctrlKey,
                      options.altKey, options.shiftKey, options.metaKey, options.button,
                      options.relatedTarget);
              } else if (keyEvents[type]){
                  simulateKeyEvent(target, type, options.bubbles,
                      options.cancelable, options.view, options.ctrlKey,
                      options.altKey, options.shiftKey, options.metaKey,
                      options.keyCode, options.charCode);
              } else if (uiEvents[type]){
                  simulateUIEvent(target, type, options.bubbles,
                      options.cancelable, options.view, options.detail);
               } else {
                  throw new Error("simulate(): Event '" + type + "' can't be simulated.");
              }
          }
docs: Simulates the event with the given name on a target.
  @param {HTMLElement} target The DOM element that's the target of the event.
  @param {String} type The type of event to simulate (i.e., "click").
  @param {Object} options (Optional) Extra options to copy onto the event object.
  @return {void}
  @method simulate
  @static
  @deprecated