examples/flux-todo-riot/bundle.js
function handleEvent(dom, handler, e) {
  var ptag = this.__.parent,
    item = this.__.item;

  if (!item)
    { while (ptag && !item) {
      item = ptag.__.item;
      ptag = ptag.__.parent;
    } }

  // override the event properties
  /* istanbul ignore next */
  if (isWritable(e, 'currentTarget')) { e.currentTarget = dom; }
  /* istanbul ignore next */
  if (isWritable(e, 'target')) { e.target = e.srcElement; }
  /* istanbul ignore next */
  if (isWritable(e, 'which')) { e.which = e.charCode || e.keyCode; }

  e.item = item;

  handler.call(this, e);

  // avoid auto updates
  if (!settings$1.autoUpdate) { return }

  if (!e.preventUpdate) {
    var p = getImmediateCustomParentTag(this);
    // fixes #2083
    if (p.isMounted) { p.update(); }
  }
}
function handleEvent(dom, handler, e) {
  var ptag = this.__.parent,
    item = this.__.item;

  if (!item)
    { while (ptag && !item) {
      item = ptag.__.item;
      ptag = ptag.__.parent;
    } }

  // override the event properties
  /* istanbul ignore next */
  if (isWritable(e, 'currentTarget')) { e.currentTarget = dom; }
  /* istanbul ignore next */
  if (isWritable(e, 'target')) { e.target = e.srcElement; }
  /* istanbul ignore next */
  if (isWritable(e, 'which')) { e.which = e.charCode || e.keyCode; }

  e.item = item;

  handler.call(this, e);

  // avoid auto updates
  if (!settings$1.autoUpdate) { return }

  if (!e.preventUpdate) {
    var p = getImmediateCustomParentTag(this);
    // fixes #2083
    if (p.isMounted) { p.update(); }
  }
}
function handleEvent ( dom , handler , e ) { var ptag = this . __ . parent , item = this . __ . item ; if ( ! item ) { while ( ptag && ! item ) { item = ptag . __ . item ; ptag = ptag . __ . parent ; } } // override the event properties /* istanbul ignore next */ if ( isWritable ( e , 'currentTarget' ) ) { e . currentTarget = dom ; } /* istanbul ignore next */ if ( isWritable ( e , 'target' ) ) { e . target = e . srcElement ; } /* istanbul ignore next */ if ( isWritable ( e , 'which' ) ) { e . which = e . charCode || e . keyCode ; } e . item = item ; handler . call ( this , e ) ; // avoid auto updates if ( ! settings$1 . autoUpdate ) { return } if ( ! e . preventUpdate ) { var p = getImmediateCustomParentTag ( this ) ; // fixes #2083 if ( p . isMounted ) { p . update ( ) ; } } }
Trigger DOM events
@param   { HTMLElement } dom - dom element target of the event
@param   { Function } handler - user function
@param   { Object } e - event object
Trigger DOM events