code: function triggerEvent(el, type, options) {
    if (isString(el)) {
      options = type;
      type = el;
      el = document;
    }
  
    var e = createEvent(type, options);
  
    el.dispatchEvent
      ? el.dispatchEvent(e)
      : el.fireEvent('on' + type, e);
  }
docs: Trigger an event of `type` on an `el` with `options`.
  
  @param {Element} el
  @param {String} type
  @param {Object} options