* Publishes a registration name that is used to identify dispatched events. * * @param {string} registrationName Registration name to add. * @param {object} PluginModule Plugin publishing the event. * @private
(registrationName, pluginModule, eventName)
| 2118 | * @private |
| 2119 | */ |
| 2120 | function publishRegistrationName(registrationName, pluginModule, eventName) { |
| 2121 | !!registrationNameModules[registrationName] ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : void 0; |
| 2122 | registrationNameModules[registrationName] = pluginModule; |
| 2123 | registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies; |
| 2124 | |
| 2125 | { |
| 2126 | var lowerCasedName = registrationName.toLowerCase(); |
| 2127 | possibleRegistrationNames[lowerCasedName] = registrationName; |
| 2128 | |
| 2129 | if (registrationName === 'onDoubleClick') { |
| 2130 | possibleRegistrationNames.ondblclick = registrationName; |
| 2131 | } |
| 2132 | } |
| 2133 | } |
| 2134 | |
| 2135 | /** |
| 2136 | * Registers plugins so that they can extract and dispatch events. |
no test coverage detected