src/render/browser/extend/components/tabheader/index.js
function fireEvent (element, type, data) {
  const evt = document.createEvent('Event')
  evt.data = data
  for (const k in data) {
    if (data.hasOwnProperty(k)) {
      evt[k] = data[k]
    }
  }
  // need bubble.
  evt.initEvent(type, true, true)

  element.dispatchEvent(evt)
}
function fireEvent (element, type, data) {
  const evt = document.createEvent('Event')
  evt.data = data
  for (const k in data) {
    if (data.hasOwnProperty(k)) {
      evt[k] = data[k]
    }
  }
  // need bubble.
  evt.initEvent(type, true, true)

  element.dispatchEvent(evt)
}
function fireEvent ( element , type , data ) { const evt = document . createEvent ( 'Event' ) evt . data = data for ( const k in data ) { if ( data . hasOwnProperty ( k ) ) { evt [ k ] = data [ k ] } } // need bubble. evt . initEvent ( type , true , true ) element . dispatchEvent ( evt ) }
trigger and broadcast events.
trigger and broadcast events .