MCPcopy
hub / github.com/OmniDB/OmniDB / inject

Function inject

OmniDB/OmniDB_app/static/OmniDB_app/lib/explain/js/react.js:8500–8555  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8498var alreadyInjected = false;
8499
8500function inject() {
8501 if (alreadyInjected) {
8502 // TODO: This is currently true because these injections are shared between
8503 // the client and the server package. They should be built independently
8504 // and not share any injection state. Then this problem will be solved.
8505 return;
8506 }
8507 alreadyInjected = true;
8508
8509 ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener);
8510
8511 /**
8512 * Inject modules for resolving DOM hierarchy and plugin ordering.
8513 */
8514 ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder);
8515 ReactInjection.EventPluginHub.injectInstanceHandle(ReactInstanceHandles);
8516 ReactInjection.EventPluginHub.injectMount(ReactMount);
8517
8518 /**
8519 * Some important event plugins included by default (without having to require
8520 * them).
8521 */
8522 ReactInjection.EventPluginHub.injectEventPluginsByName({
8523 SimpleEventPlugin: SimpleEventPlugin,
8524 EnterLeaveEventPlugin: EnterLeaveEventPlugin,
8525 ChangeEventPlugin: ChangeEventPlugin,
8526 SelectEventPlugin: SelectEventPlugin,
8527 BeforeInputEventPlugin: BeforeInputEventPlugin
8528 });
8529
8530 ReactInjection.NativeComponent.injectGenericComponentClass(ReactDOMComponent);
8531
8532 ReactInjection.NativeComponent.injectTextComponentClass(ReactDOMTextComponent);
8533
8534 ReactInjection.Class.injectMixin(ReactBrowserComponentMixin);
8535
8536 ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);
8537 ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);
8538
8539 ReactInjection.EmptyComponent.injectEmptyComponent('noscript');
8540
8541 ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction);
8542 ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy);
8543
8544 ReactInjection.RootIndex.injectCreateReactRootIndex(ExecutionEnvironment.canUseDOM ? ClientReactRootIndex.createReactRootIndex : ServerReactRootIndex.createReactRootIndex);
8545
8546 ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);
8547
8548 if ("development" !== 'production') {
8549 var url = ExecutionEnvironment.canUseDOM && window.location.href || '';
8550 if (/[?&]react_perf\b/.test(url)) {
8551 var ReactDefaultPerf = _dereq_(50);
8552 ReactDefaultPerf.start();
8553 }
8554 }
8555}
8556
8557module.exports = {

Callers

nothing calls this directly

Calls 1

_dereq_Function · 0.85

Tested by

no test coverage detected