mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
* Refactor event emitters to reduce indirection * Remove unused handleTopLevel() injection * Rename handleTopLevel() to runExtractedEventsInBatch() and remove import indirection
36 lines
1.3 KiB
JavaScript
36 lines
1.3 KiB
JavaScript
/**
|
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
import * as EventPluginHub from 'events/EventPluginHub';
|
|
import * as EventPluginUtils from 'events/EventPluginUtils';
|
|
|
|
import * as ReactDOMComponentTree from './ReactDOMComponentTree';
|
|
import BeforeInputEventPlugin from '../events/BeforeInputEventPlugin';
|
|
import ChangeEventPlugin from '../events/ChangeEventPlugin';
|
|
import DOMEventPluginOrder from '../events/DOMEventPluginOrder';
|
|
import EnterLeaveEventPlugin from '../events/EnterLeaveEventPlugin';
|
|
import SelectEventPlugin from '../events/SelectEventPlugin';
|
|
import SimpleEventPlugin from '../events/SimpleEventPlugin';
|
|
|
|
/**
|
|
* Inject modules for resolving DOM hierarchy and plugin ordering.
|
|
*/
|
|
EventPluginHub.injection.injectEventPluginOrder(DOMEventPluginOrder);
|
|
EventPluginUtils.injection.injectComponentTree(ReactDOMComponentTree);
|
|
|
|
/**
|
|
* Some important event plugins included by default (without having to require
|
|
* them).
|
|
*/
|
|
EventPluginHub.injection.injectEventPluginsByName({
|
|
SimpleEventPlugin: SimpleEventPlugin,
|
|
EnterLeaveEventPlugin: EnterLeaveEventPlugin,
|
|
ChangeEventPlugin: ChangeEventPlugin,
|
|
SelectEventPlugin: SelectEventPlugin,
|
|
BeforeInputEventPlugin: BeforeInputEventPlugin,
|
|
});
|