src/render/browser/base/component/index.js
function isEventValid (comp, type) {
  // if a component has aleary triggered 'appear' event, then
  // the 'appear' even† can't be triggered again utill the
  // 'disappear' event triggered.
  if (appearEvts.indexOf(type) <= -1) {
    return true
  }
  if (comp._appear === undefined && type === 'disappear') {
    return false
  }
  let res
  if (comp._appear === undefined && type === 'appear') {
    res = true
  }
  else {
    res = type !== comp._appear
  }
  res && (comp._appear = type)
  return res
}
function isEventValid (comp, type) {
  // if a component has aleary triggered 'appear' event, then
  // the 'appear' even† can't be triggered again utill the
  // 'disappear' event triggered.
  if (appearEvts.indexOf(type) <= -1) {
    return true
  }
  if (comp._appear === undefined && type === 'disappear') {
    return false
  }
  let res
  if (comp._appear === undefined && type === 'appear') {
    res = true
  }
  else {
    res = type !== comp._appear
  }
  res && (comp._appear = type)
  return res
}
function isEventValid ( comp , type ) { // if a component has aleary triggered 'appear' event, then // the 'appear' even† can't be triggered again utill the // 'disappear' event triggered. if ( appearEvts . indexOf ( type ) <= - 1 ) { return true } if ( comp . _appear === undefined && type === 'disappear' ) { return false } let res if ( comp . _appear === undefined && type === 'appear' ) { res = true } else { res = type !== comp . _appear } res && ( comp . _appear = type ) return res }
check whether a event is valid to dispatch.
@param  {Component}      comp  the component that this event is to trigger on.
@param  {string}  type   the event type.
@return {Boolean}        is it valid to dispatch.
check whether a event is valid to dispatch .