* 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)
| 1980 | * @private |
| 1981 | */ |
| 1982 | function publishRegistrationName(registrationName, pluginModule, eventName) { |
| 1983 | !!registrationNameModules[registrationName] ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : void 0; |
| 1984 | registrationNameModules[registrationName] = pluginModule; |
| 1985 | registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies; |
| 1986 | |
| 1987 | { |
| 1988 | var lowerCasedName = registrationName.toLowerCase(); |
| 1989 | possibleRegistrationNames[lowerCasedName] = registrationName; |
| 1990 | |
| 1991 | if (registrationName === 'onDoubleClick') { |
| 1992 | possibleRegistrationNames.ondblclick = registrationName; |
| 1993 | } |
| 1994 | } |
| 1995 | } |
| 1996 | |
| 1997 | /** |
| 1998 | * Registers plugins so that they can extract and dispatch events. |
no test coverage detected