code: function createEvent (type, data) {
    let event = document.createEvent(specialEvents[type] || 'Event')
    event.initEvent(type, true, true)
    data && (event.data = data)
    return event
  }
docs: Create a event object to dispatch
  
  @param {string} type Event name
  @param {?Object} data Custom data
  @return {Event}