* Injects an ordering of plugins (by plugin name). This allows the ordering * to be decoupled from injection of the actual plugins so that ordering is * always deterministic regardless of packaging, on-the-fly injection, etc. * * @param {array} InjectedEventPluginOrder * @internal
(injectedEventPluginOrder)
| 600 | */ |
| 601 | |
| 602 | function injectEventPluginOrder(injectedEventPluginOrder) { |
| 603 | if (!!eventPluginOrder) { |
| 604 | { |
| 605 | throw Error( "EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React." ); |
| 606 | } |
| 607 | } // Clone the ordering so it cannot be dynamically mutated. |
| 608 | |
| 609 | |
| 610 | eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder); |
| 611 | recomputePluginOrdering(); |
| 612 | } |
| 613 | /** |
| 614 | * Injects plugins to be used by plugin event system. The plugin names must be |
| 615 | * in the ordering injected by `injectEventPluginOrder`. |
no test coverage detected