examples/dist/common.js
function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
  var chars;

  if (canUseTextInputEvent) {
    chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
  } else {
    chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
  }

  // If no characters are being inserted, no BeforeInput event should
  // be fired.
  if (!chars) {
    return null;
  }

  var event = SyntheticInputEvent_1.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);

  event.data = chars;
  EventPropagators_1.accumulateTwoPhaseDispatches(event);
  return event;
}
function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
  var chars;

  if (canUseTextInputEvent) {
    chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
  } else {
    chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
  }

  // If no characters are being inserted, no BeforeInput event should
  // be fired.
  if (!chars) {
    return null;
  }

  var event = SyntheticInputEvent_1.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);

  event.data = chars;
  EventPropagators_1.accumulateTwoPhaseDispatches(event);
  return event;
}
function extractBeforeInputEvent ( topLevelType , targetInst , nativeEvent , nativeEventTarget ) { var chars ; if ( canUseTextInputEvent ) { chars = getNativeBeforeInputChars ( topLevelType , nativeEvent ) ; } else { chars = getFallbackBeforeInputChars ( topLevelType , nativeEvent ) ; } // If no characters are being inserted, no BeforeInput event should // be fired. if ( ! chars ) { return null ; } var event = SyntheticInputEvent_1 . getPooled ( eventTypes . beforeInput , targetInst , nativeEvent , nativeEventTarget ) ; event . data = chars ; EventPropagators_1 . accumulateTwoPhaseDispatches ( event ) ; return event ; }
Extract a SyntheticInputEvent for `beforeInput`, based on either native
`textInput` or fallback behavior.

@return {?object} A SyntheticInputEvent.
Extract a SyntheticInputEvent for beforeInput based on either native textInput or fallback behavior .