(contentWindow: any, bridge: BackendBridge)
| 68 | } |
| 69 | |
| 70 | function 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 | |
| 94 | export function activate( |
| 95 | contentWindow: any, |
no test coverage detected