function registerSimplePluginEventsAndSetTheirPriorities(eventTypes, priority) {
    // As the event types are in pairs of two, we need to iterate
    // through in twos. The events are in pairs of two to save code
    // and improve init perf of processing this array, as it will
    // result in far fewer object allocations and property accesses
    // if we only use three arrays to process all the categories of
    // instead of tuples.
    for (var i = 0; i < eventTypes.length; i += 2) {
      var topEvent = eventTypes[i];
      var event = eventTypes[i + 1];
      var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
      var reactName = 'on' + capitalizedEvent;
      eventPriorities.set(topEvent, priority);
      topLevelEventsToReactNames.set(topEvent, reactName);
      registerTwoPhaseEvent(reactName, [topEvent]);
    }
  }
Turns
['abort', ...]

into

topLevelEventsToReactNames = new Map([
  ['abort', 'onAbort'],
]);

and registers them.