function trapBubbledEvent(topLevelType, element) {
  if (!element) {
    return null;
  }
  var dispatch = isInteractiveTopLevelEventType(topLevelType) ? dispatchInteractiveEvent : dispatchEvent;

  addEventBubbleListener(element, getRawEventName(topLevelType),
  // Check if interactive and wrap in interactiveUpdates
  dispatch.bind(null, topLevelType));
}
Traps top-level events by using event bubbling.

@param {number} topLevelType Number from `TopLevelEventTypes`.
@param {object} element Element on which to attach listener.
@return {?object} An object with a remove function which will forcefully
                 remove the listener.
@internal