Skip to content

Commit 41bf86b

Browse files
authored
Expose API for selectively overriding frontend host methods (#168)
1 parent 343405b commit 41bf86b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

front_end/core/host/InspectorFrontendHost.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,12 @@ function initializeInspectorFrontendHost(): void {
609609

610610
// Attach the events object.
611611
InspectorFrontendHostInstance.events = new Common.ObjectWrapper.ObjectWrapper();
612+
613+
// @ts-ignore Global injected by the React Native DevTools shell.
614+
const {reactNativeDecorateInspectorFrontendHostInstance} = globalThis;
615+
if (typeof reactNativeDecorateInspectorFrontendHostInstance === 'function') {
616+
reactNativeDecorateInspectorFrontendHostInstance(InspectorFrontendHostInstance);
617+
}
612618
}
613619

614620
// FIXME: This file is included into both apps, since the devtools_app needs the InspectorFrontendHostAPI only,

0 commit comments

Comments
 (0)