src/lib/gesture.js
function fireEvent(element, type, extra) {
  var event = doc.createEvent('HTMLEvents')
  event.initEvent(type, true, true)

  if (typeof extra === 'object') {
    for (var p in extra) {
      event[p] = extra[p]
    }
  }

  /**
   * A flag to distinguish with other events with the same name generated
   * by another library in the same page.
   */ 
  event._for = 'weex'

  element.dispatchEvent(event)
}
function fireEvent(element, type, extra) {
  var event = doc.createEvent('HTMLEvents')
  event.initEvent(type, true, true)

  if (typeof extra === 'object') {
    for (var p in extra) {
      event[p] = extra[p]
    }
  }

  /**
   * A flag to distinguish with other events with the same name generated
   * by another library in the same page.
   */ 
  event._for = 'weex'

  element.dispatchEvent(event)
}
function fireEvent ( element , type , extra ) { var event = doc . createEvent ( 'HTMLEvents' ) event . initEvent ( type , true , true ) if ( typeof extra === 'object' ) { for ( var p in extra ) { event [ p ] = extra [ p ] } } /**
   * A flag to distinguish with other events with the same name generated
   * by another library in the same page.
   */ event . _for = 'weex' element . dispatchEvent ( event ) }
fire a HTMLEvent

@param  {Element} element which element to fire a event on
@param  {string}  type    type of event
@param  {object}  extra   extra data for the event object
fire a HTMLEvent