MCPcopy
hub / github.com/facebook/react / finishActivation

Function finishActivation

packages/react-devtools-inline/src/backend.js:70–92  ·  view source on GitHub ↗
(contentWindow: any, bridge: BackendBridge)

Source from the content-addressed store, hash-verified

68}
69
70function finishActivation(contentWindow: any, bridge: BackendBridge) {
71 const agent = new Agent(
72 bridge,
73 getIfReloadedAndProfiling(),
74 onReloadAndProfile,
75 );
76 onReloadAndProfileFlagsReset();
77
78 const hook = contentWindow.__REACT_DEVTOOLS_GLOBAL_HOOK__;
79 if (hook) {
80 initBackend(hook, agent, contentWindow, getIsReloadAndProfileSupported());
81
82 // Setup React Native style editor if a renderer like react-native-web has injected it.
83 if (hook.resolveRNStyle) {
84 setupNativeStyleEditor(
85 bridge,
86 agent,
87 hook.resolveRNStyle,
88 hook.nativeStyleEditorValidAttributes,
89 );
90 }
91 }
92}
93
94export function activate(
95 contentWindow: any,

Callers 1

onSavedPreferencesFunction · 0.85

Calls 5

initBackendFunction · 0.90
setupNativeStyleEditorFunction · 0.85

Tested by

no test coverage detected