@@ -19,9 +19,10 @@ import type {
19
19
} from 'react-devtools-shared/src/frontend/types' ;
20
20
import type { FrontendBridge } from 'react-devtools-shared/src/bridge' ;
21
21
import type {
22
+ CanViewElementSource ,
23
+ TabID ,
22
24
ViewAttributeSource ,
23
25
ViewElementSource ,
24
- CanViewElementSource ,
25
26
} from 'react-devtools-shared/src/devtools/views/DevTools' ;
26
27
import type { Config } from 'react-devtools-shared/src/devtools/store' ;
27
28
@@ -51,10 +52,11 @@ type InitializationOptions = {
51
52
canViewElementSourceFunction ?: CanViewElementSource ,
52
53
} ;
53
54
54
- export function initialize (
55
+ function initializeTab (
56
+ tab : TabID ,
55
57
contentWindow : Element | Document ,
56
58
options : InitializationOptions ,
57
- ) : void {
59
+ ) {
58
60
const {
59
61
bridge,
60
62
store,
@@ -70,7 +72,8 @@ export function initialize(
70
72
bridge = { bridge }
71
73
browserTheme = { theme }
72
74
store = { store }
73
- showTabBar = { true }
75
+ showTabBar = { false }
76
+ overrideTab = { tab }
74
77
warnIfLegacyBackendDetected = { true }
75
78
enabledInspectedElementContextMenu = { true }
76
79
viewAttributeSourceFunction = { viewAttributeSourceFunction }
@@ -79,3 +82,17 @@ export function initialize(
79
82
/> ,
80
83
) ;
81
84
}
85
+
86
+ export function initializeComponents (
87
+ contentWindow : Element | Document ,
88
+ options : InitializationOptions ,
89
+ ) : void {
90
+ initializeTab ( 'components' , contentWindow , options ) ;
91
+ }
92
+
93
+ export function initializeProfiler (
94
+ contentWindow : Element | Document ,
95
+ options : InitializationOptions ,
96
+ ) : void {
97
+ initializeTab ( 'profiler' , contentWindow , options ) ;
98
+ }
0 commit comments