|
31 | 31 | import * as Common from '../../core/common/common.js';
|
32 | 32 | import * as i18n from '../../core/i18n/i18n.js';
|
33 | 33 | import * as Platform from '../../core/platform/platform.js';
|
| 34 | +import * as Root from '../../core/root/root.js'; |
34 | 35 | import * as SDK from '../../core/sdk/sdk.js';
|
35 | 36 | import * as NetworkForward from '../../panels/network/forward/forward.js';
|
36 | 37 | import * as IconButton from '../../ui/components/icon_button/icon_button.js';
|
@@ -150,11 +151,18 @@ export class NetworkItemView extends UI.TabbedPane.TabbedPane {
|
150 | 151 | private readonly responseView: RequestResponseView|undefined;
|
151 | 152 | private cookiesView: RequestCookiesView|null;
|
152 | 153 | private initialTab?: NetworkForward.UIRequestLocation.UIRequestTabs;
|
| 154 | + private readonly isReactNative: boolean = false; |
153 | 155 |
|
154 | 156 | constructor(
|
155 | 157 | request: SDK.NetworkRequest.NetworkRequest, calculator: NetworkTimeCalculator,
|
156 | 158 | initialTab?: NetworkForward.UIRequestLocation.UIRequestTabs) {
|
157 | 159 | super();
|
| 160 | + |
| 161 | + // [RN] Used to scope down available features for React Native targets |
| 162 | + this.isReactNative = Root.Runtime.experiments.isEnabled( |
| 163 | + Root.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI, |
| 164 | + ); |
| 165 | + |
158 | 166 | this.requestInternal = request;
|
159 | 167 | this.element.classList.add('network-item-view');
|
160 | 168 | this.headerElement().setAttribute('jslog', `${VisualLogging.toolbar('request-details').track({
|
@@ -222,9 +230,11 @@ export class NetworkItemView extends UI.TabbedPane.TabbedPane {
|
222 | 230 | }
|
223 | 231 | }
|
224 | 232 |
|
225 |
| - this.appendTab( |
226 |
| - NetworkForward.UIRequestLocation.UIRequestTabs.INITIATOR, i18nString(UIStrings.initiator), |
227 |
| - new RequestInitiatorView(request), i18nString(UIStrings.requestInitiatorCallStack)); |
| 233 | + if (!this.isReactNative) { |
| 234 | + this.appendTab( |
| 235 | + NetworkForward.UIRequestLocation.UIRequestTabs.INITIATOR, i18nString(UIStrings.initiator), |
| 236 | + new RequestInitiatorView(request), i18nString(UIStrings.requestInitiatorCallStack)); |
| 237 | + } |
228 | 238 |
|
229 | 239 | this.appendTab(
|
230 | 240 | NetworkForward.UIRequestLocation.UIRequestTabs.TIMING, i18nString(UIStrings.timing),
|
|
0 commit comments