chrome-devtools-frontend 1.0.951864 → 1.0.952284
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/front_end/.eslintrc.js +6 -0
- package/front_end/entrypoints/formatter_worker/AcornTokenizer.ts +36 -36
- package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +53 -53
- package/front_end/entrypoints/formatter_worker/ESTreeWalker.ts +11 -11
- package/front_end/entrypoints/formatter_worker/FormattedContentBuilder.ts +43 -43
- package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +106 -105
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +26 -26
- package/front_end/entrypoints/heap_snapshot_worker/AllocationProfile.ts +50 -55
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +200 -200
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +84 -83
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +15 -15
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +21 -21
- package/front_end/entrypoints/main/ExecutionContextSelector.ts +30 -30
- package/front_end/entrypoints/main/MainImpl.ts +12 -12
- package/front_end/entrypoints/node_app/NodeConnectionsPanel.ts +33 -33
- package/front_end/entrypoints/node_app/NodeMain.ts +35 -35
- package/front_end/generated/InspectorBackendCommands.js +5 -1
- package/front_end/generated/protocol.d.ts +16 -0
- package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +6 -6
- package/front_end/models/issues_manager/ContrastCheckTrigger.ts +15 -15
- package/front_end/models/issues_manager/CorsIssue.ts +9 -9
- package/front_end/models/issues_manager/CrossOriginEmbedderPolicyIssue.ts +5 -5
- package/front_end/models/issues_manager/DeprecationIssue.ts +7 -7
- package/front_end/models/issues_manager/GenericIssue.ts +5 -5
- package/front_end/models/issues_manager/HeavyAdIssue.ts +5 -5
- package/front_end/models/issues_manager/Issue.ts +10 -10
- package/front_end/models/issues_manager/IssueResolver.ts +11 -10
- package/front_end/models/issues_manager/IssuesManager.ts +56 -56
- package/front_end/models/issues_manager/LowTextContrastIssue.ts +4 -4
- package/front_end/models/issues_manager/MixedContentIssue.ts +7 -7
- package/front_end/models/issues_manager/NavigatorUserAgentIssue.ts +7 -7
- package/front_end/models/issues_manager/QuirksModeIssue.ts +4 -4
- package/front_end/models/issues_manager/SameSiteCookieIssue.ts +16 -16
- package/front_end/models/issues_manager/SharedArrayBufferIssue.ts +5 -5
- package/front_end/models/issues_manager/SourceFrameIssuesManager.ts +32 -31
- package/front_end/models/issues_manager/TrustedWebActivityIssue.ts +5 -5
- package/front_end/models/issues_manager/WasmCrossOriginModuleSharingIssue.ts +5 -5
- package/front_end/panels/application/components/BackForwardCacheView.ts +33 -33
- package/front_end/panels/application/components/EndpointsGrid.ts +12 -12
- package/front_end/panels/application/components/FrameDetailsView.ts +108 -110
- package/front_end/panels/application/components/OriginTrialTreeView.ts +45 -45
- package/front_end/panels/application/components/PermissionsPolicySection.ts +19 -19
- package/front_end/panels/application/components/ReportsGrid.ts +30 -30
- package/front_end/panels/application/components/StackTrace.ts +48 -47
- package/front_end/panels/application/components/TrustTokensView.ts +31 -31
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +41 -52
- package/front_end/panels/css_overview/CSSOverviewController.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +18 -27
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +6 -6
- package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +4 -4
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +17 -17
- package/front_end/panels/elements/components/AdornerManager.ts +21 -21
- package/front_end/panels/elements/components/AdornerSettingsPane.ts +14 -14
- package/front_end/panels/elements/components/CSSQuery.ts +16 -16
- package/front_end/panels/elements/components/ComputedStyleProperty.ts +14 -14
- package/front_end/panels/elements/components/ComputedStyleTrace.ts +15 -15
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +78 -78
- package/front_end/panels/elements/components/ElementsPanelLink.ts +16 -16
- package/front_end/panels/elements/components/LayoutPane.ts +47 -47
- package/front_end/panels/elements/components/NodeText.ts +18 -18
- package/front_end/panels/elements/components/QueryContainer.ts +40 -40
- package/front_end/panels/elements/components/StylePropertyEditor.ts +18 -18
- package/front_end/panels/emulation/components/DeviceSizeInputElement.ts +4 -4
- package/front_end/panels/issues/AffectedBlockedByResponseView.ts +4 -4
- package/front_end/panels/issues/AffectedCookiesView.ts +4 -5
- package/front_end/panels/issues/AffectedDirectivesView.ts +19 -19
- package/front_end/panels/issues/AffectedDocumentsInQuirksModeView.ts +7 -8
- package/front_end/panels/issues/AffectedElementsView.ts +4 -4
- package/front_end/panels/issues/AffectedElementsWithLowContrastView.ts +7 -8
- package/front_end/panels/issues/AffectedHeavyAdView.ts +8 -8
- package/front_end/panels/issues/AffectedResourcesView.ts +25 -26
- package/front_end/panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts +8 -8
- package/front_end/panels/issues/AffectedSourcesView.ts +4 -4
- package/front_end/panels/issues/AffectedTrustedWebActivityIssueDetailsView.ts +4 -4
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +17 -17
- package/front_end/panels/issues/CSPViolationsListView.ts +22 -23
- package/front_end/panels/issues/CSPViolationsView.ts +17 -17
- package/front_end/panels/issues/ComboBoxOfCheckBoxes.ts +13 -13
- package/front_end/panels/issues/CorsIssueDetailsView.ts +23 -23
- package/front_end/panels/issues/GenericIssueDetailsView.ts +4 -4
- package/front_end/panels/issues/HiddenIssuesRow.ts +7 -7
- package/front_end/panels/issues/IssueAggregator.ts +95 -95
- package/front_end/panels/issues/IssueKindView.ts +14 -14
- package/front_end/panels/issues/IssueView.ts +98 -98
- package/front_end/panels/issues/IssuesPane.ts +102 -102
- package/front_end/panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts +5 -5
- package/front_end/panels/issues/components/HideIssuesMenu.ts +10 -10
- package/front_end/panels/media/PlayerListView.ts +160 -97
- package/front_end/panels/media/PlayerMessagesView.ts +1 -0
- package/front_end/panels/media/playerListView.css +58 -0
- package/front_end/panels/network/NetworkLogView.ts +2 -6
- package/front_end/panels/network/NetworkWaterfallColumn.ts +2 -4
- package/front_end/panels/network/components/RequestTrustTokensView.ts +40 -40
- package/front_end/panels/network/components/WebBundleInfoView.ts +9 -9
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +6 -12
- package/front_end/panels/settings/components/SyncSection.ts +14 -14
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +96 -96
- package/front_end/panels/sources/BreakpointEditDialog.ts +4 -3
- package/front_end/panels/timeline/components/WebVitalsLane.ts +77 -76
- package/front_end/panels/timeline/components/WebVitalsTimeline.ts +133 -133
- package/front_end/panels/timeline/components/WebVitalsTooltip.ts +9 -9
- package/front_end/panels/webauthn/WebauthnPane.ts +203 -205
- package/front_end/ui/components/adorners/Adorner.ts +2 -2
- package/front_end/ui/components/buttons/Button.ts +9 -9
- package/front_end/ui/components/data_grid/DataGrid.ts +62 -62
- package/front_end/ui/components/data_grid/DataGridController.ts +22 -22
- package/front_end/ui/components/diff_view/DiffView.ts +6 -6
- package/front_end/ui/components/expandable_list/ExpandableList.ts +5 -5
- package/front_end/ui/components/icon_button/Icon.ts +4 -4
- package/front_end/ui/components/icon_button/IconButton.ts +4 -4
- package/front_end/ui/components/issue_counter/IssueCounter.ts +3 -3
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +11 -11
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +50 -50
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +6 -6
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +4 -4
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryNavigator.ts +12 -12
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts +11 -11
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +40 -39
- package/front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts +18 -18
- package/front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings.ts +6 -6
- package/front_end/ui/components/linkifier/LinkifierImpl.ts +4 -4
- package/front_end/ui/components/markdown_view/MarkdownImage.ts +5 -5
- package/front_end/ui/components/markdown_view/MarkdownLink.ts +2 -2
- package/front_end/ui/components/markdown_view/MarkdownView.ts +4 -4
- package/front_end/ui/components/panel_feedback/FeedbackButton.ts +2 -2
- package/front_end/ui/components/panel_feedback/PanelFeedback.ts +2 -2
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +4 -4
- package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +22 -22
- package/front_end/ui/components/report_view/ReportView.ts +16 -16
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +14 -14
- package/front_end/ui/components/settings/SettingCheckbox.ts +5 -5
- package/front_end/ui/components/survey_link/SurveyLink.ts +8 -8
- package/front_end/ui/components/text_editor/TextEditor.ts +9 -9
- package/front_end/ui/components/text_prompt/TextPrompt.ts +18 -18
- package/front_end/ui/components/tree_outline/TreeOutline.ts +69 -70
- package/front_end/ui/legacy/themeColors.css +2 -0
- package/front_end/ui/legacy/theme_support/theme_support_impl.ts +12 -0
- package/package.json +1 -1
- package/scripts/eslint_rules/lib/use_private_class_members.js +41 -0
- package/scripts/eslint_rules/tests/use_private_class_members_test.js +62 -0
- package/scripts/migration/class-fields/migrate.js +2 -3
- package/scripts/migration/class-fields/migrate.sh +1 -3
- package/scripts/migration/class-fields/package.json +1 -1
|
@@ -114,7 +114,7 @@ const str_ = i18n.i18n.registerUIStrings('entrypoints/main/MainImpl.ts', UIStrin
|
|
|
114
114
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
115
115
|
|
|
116
116
|
export class MainImpl {
|
|
117
|
-
|
|
117
|
+
#lateInitDonePromise!: Promise<void>;
|
|
118
118
|
|
|
119
119
|
constructor() {
|
|
120
120
|
MainImpl.instanceForTest = this;
|
|
@@ -606,12 +606,12 @@ export class MainImpl {
|
|
|
606
606
|
Common.Settings.Settings.instance().moduleSetting(setting).addChangeListener(changeListener);
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
|
-
this
|
|
609
|
+
this.#lateInitDonePromise = Promise.all(promises).then(() => undefined);
|
|
610
610
|
MainImpl.timeEnd('Main._lateInitialization');
|
|
611
611
|
}
|
|
612
612
|
|
|
613
613
|
lateInitDonePromiseForTest(): Promise<void>|null {
|
|
614
|
-
return this
|
|
614
|
+
return this.#lateInitDonePromise;
|
|
615
615
|
}
|
|
616
616
|
|
|
617
617
|
private registerMessageSinkListener(): void {
|
|
@@ -769,11 +769,11 @@ export class SearchActionDelegate implements UI.ActionRegistration.ActionDelegat
|
|
|
769
769
|
let mainMenuItemInstance: MainMenuItem;
|
|
770
770
|
|
|
771
771
|
export class MainMenuItem implements UI.Toolbar.Provider {
|
|
772
|
-
|
|
772
|
+
readonly #itemInternal: UI.Toolbar.ToolbarMenuButton;
|
|
773
773
|
constructor() {
|
|
774
|
-
this
|
|
775
|
-
this
|
|
776
|
-
this
|
|
774
|
+
this.#itemInternal = new UI.Toolbar.ToolbarMenuButton(this.handleContextMenu.bind(this), true);
|
|
775
|
+
this.#itemInternal.element.classList.add('main-menu');
|
|
776
|
+
this.#itemInternal.setTitle(i18nString(UIStrings.customizeAndControlDevtools));
|
|
777
777
|
}
|
|
778
778
|
|
|
779
779
|
static instance(opts: {
|
|
@@ -788,7 +788,7 @@ export class MainMenuItem implements UI.Toolbar.Provider {
|
|
|
788
788
|
}
|
|
789
789
|
|
|
790
790
|
item(): UI.Toolbar.ToolbarItem|null {
|
|
791
|
-
return this
|
|
791
|
+
return this.#itemInternal;
|
|
792
792
|
}
|
|
793
793
|
|
|
794
794
|
private handleContextMenu(contextMenu: UI.ContextMenu.ContextMenu): void {
|
|
@@ -853,7 +853,7 @@ export class MainMenuItem implements UI.Toolbar.Provider {
|
|
|
853
853
|
contextMenu.headerSection().appendCustomItem(dockItemElement);
|
|
854
854
|
}
|
|
855
855
|
|
|
856
|
-
const button = (this
|
|
856
|
+
const button = (this.#itemInternal.element as HTMLButtonElement);
|
|
857
857
|
|
|
858
858
|
function setDockSide(side: UI.DockController.DockState): void {
|
|
859
859
|
UI.DockController.DockController.instance().once(UI.DockController.Events.AfterDockSideChanged).then(() => {
|
|
@@ -926,10 +926,10 @@ export class MainMenuItem implements UI.Toolbar.Provider {
|
|
|
926
926
|
let settingsButtonProviderInstance: SettingsButtonProvider;
|
|
927
927
|
|
|
928
928
|
export class SettingsButtonProvider implements UI.Toolbar.Provider {
|
|
929
|
-
|
|
929
|
+
readonly #settingsButton: UI.Toolbar.ToolbarButton;
|
|
930
930
|
private constructor() {
|
|
931
931
|
const settingsActionId = 'settings.show';
|
|
932
|
-
this
|
|
932
|
+
this.#settingsButton =
|
|
933
933
|
UI.Toolbar.Toolbar.createActionButtonForId(settingsActionId, {showLabel: false, userActionCode: undefined});
|
|
934
934
|
}
|
|
935
935
|
|
|
@@ -945,7 +945,7 @@ export class SettingsButtonProvider implements UI.Toolbar.Provider {
|
|
|
945
945
|
}
|
|
946
946
|
|
|
947
947
|
item(): UI.Toolbar.ToolbarItem|null {
|
|
948
|
-
return this
|
|
948
|
+
return this.#settingsButton;
|
|
949
949
|
}
|
|
950
950
|
}
|
|
951
951
|
|
|
@@ -38,8 +38,8 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
38
38
|
let nodeConnectionsPanelInstance: NodeConnectionsPanel;
|
|
39
39
|
|
|
40
40
|
export class NodeConnectionsPanel extends UI.Panel.Panel {
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
#config!: Adb.Config;
|
|
42
|
+
readonly #networkDiscoveryView: NodeConnectionsView;
|
|
43
43
|
private constructor() {
|
|
44
44
|
super('node-connection');
|
|
45
45
|
|
|
@@ -60,11 +60,11 @@ export class NodeConnectionsPanel extends UI.Panel.Panel {
|
|
|
60
60
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesUpdatesEnabled(false);
|
|
61
61
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesUpdatesEnabled(true);
|
|
62
62
|
|
|
63
|
-
this
|
|
64
|
-
this
|
|
65
|
-
Host.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesDiscoveryConfig(this
|
|
63
|
+
this.#networkDiscoveryView = new NodeConnectionsView(config => {
|
|
64
|
+
this.#config.networkDiscoveryConfig = config;
|
|
65
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.setDevicesDiscoveryConfig(this.#config);
|
|
66
66
|
});
|
|
67
|
-
this
|
|
67
|
+
this.#networkDiscoveryView.show(container);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
static instance(opts: {
|
|
@@ -79,8 +79,8 @@ export class NodeConnectionsPanel extends UI.Panel.Panel {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
private devicesDiscoveryConfigChanged({data: config}: Common.EventTarget.EventTargetEvent<Adb.Config>): void {
|
|
82
|
-
this
|
|
83
|
-
this
|
|
82
|
+
this.#config = config;
|
|
83
|
+
this.#networkDiscoveryView.discoveryConfigChanged(this.#config.networkDiscoveryConfig);
|
|
84
84
|
}
|
|
85
85
|
wasShown(): void {
|
|
86
86
|
super.wasShown();
|
|
@@ -89,15 +89,15 @@ export class NodeConnectionsPanel extends UI.Panel.Panel {
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
export class NodeConnectionsView extends UI.Widget.VBox implements UI.ListWidget.Delegate<Adb.PortForwardingRule> {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
readonly #callback: (arg0: Adb.NetworkDiscoveryConfig) => void;
|
|
93
|
+
readonly #list: UI.ListWidget.ListWidget<Adb.PortForwardingRule>;
|
|
94
|
+
#editor: UI.ListWidget.Editor<Adb.PortForwardingRule>|null;
|
|
95
|
+
#networkDiscoveryConfig: {
|
|
96
96
|
address: string,
|
|
97
97
|
}[];
|
|
98
98
|
constructor(callback: (arg0: Adb.NetworkDiscoveryConfig) => void) {
|
|
99
99
|
super();
|
|
100
|
-
this
|
|
100
|
+
this.#callback = callback;
|
|
101
101
|
this.element.classList.add('network-discovery-view');
|
|
102
102
|
|
|
103
103
|
const networkDiscoveryFooter = this.element.createChild('div', 'network-discovery-footer');
|
|
@@ -106,42 +106,42 @@ export class NodeConnectionsView extends UI.Widget.VBox implements UI.ListWidget
|
|
|
106
106
|
networkDiscoveryFooter.appendChild(
|
|
107
107
|
i18n.i18n.getFormatLocalizedString(str_, UIStrings.specifyNetworkEndpointAnd, {PH1: documentationLink}));
|
|
108
108
|
|
|
109
|
-
this
|
|
109
|
+
this.#list = new UI.ListWidget.ListWidget(this);
|
|
110
110
|
|
|
111
|
-
this
|
|
111
|
+
this.#list.element.classList.add('network-discovery-list');
|
|
112
112
|
const placeholder = document.createElement('div');
|
|
113
113
|
placeholder.classList.add('network-discovery-list-empty');
|
|
114
114
|
placeholder.textContent = i18nString(UIStrings.noConnectionsSpecified);
|
|
115
|
-
this
|
|
116
|
-
this
|
|
117
|
-
this
|
|
115
|
+
this.#list.setEmptyPlaceholder(placeholder);
|
|
116
|
+
this.#list.show(this.element);
|
|
117
|
+
this.#editor = null;
|
|
118
118
|
|
|
119
119
|
const addButton = UI.UIUtils.createTextButton(
|
|
120
120
|
i18nString(UIStrings.addConnection), this.addNetworkTargetButtonClicked.bind(this), 'add-network-target-button',
|
|
121
121
|
true /* primary */);
|
|
122
122
|
this.element.appendChild(addButton);
|
|
123
123
|
|
|
124
|
-
this
|
|
124
|
+
this.#networkDiscoveryConfig = [];
|
|
125
125
|
|
|
126
126
|
this.element.classList.add('node-frontend');
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
private update(): void {
|
|
130
|
-
const config = this
|
|
131
|
-
this
|
|
130
|
+
const config = this.#networkDiscoveryConfig.map(item => item.address);
|
|
131
|
+
this.#callback.call(null, config);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
private addNetworkTargetButtonClicked(): void {
|
|
135
|
-
this
|
|
135
|
+
this.#list.addNewItem(this.#networkDiscoveryConfig.length, {address: '', port: ''});
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
discoveryConfigChanged(networkDiscoveryConfig: Adb.NetworkDiscoveryConfig): void {
|
|
139
|
-
this
|
|
140
|
-
this
|
|
139
|
+
this.#networkDiscoveryConfig = [];
|
|
140
|
+
this.#list.clear();
|
|
141
141
|
for (const address of networkDiscoveryConfig) {
|
|
142
142
|
const item = {address: address, port: ''};
|
|
143
|
-
this
|
|
144
|
-
this
|
|
143
|
+
this.#networkDiscoveryConfig.push(item);
|
|
144
|
+
this.#list.appendItem(item, true);
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
|
|
@@ -153,15 +153,15 @@ export class NodeConnectionsView extends UI.Widget.VBox implements UI.ListWidget
|
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
removeItemRequested(rule: Adb.PortForwardingRule, index: number): void {
|
|
156
|
-
this
|
|
157
|
-
this
|
|
156
|
+
this.#networkDiscoveryConfig.splice(index, 1);
|
|
157
|
+
this.#list.removeItem(index);
|
|
158
158
|
this.update();
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
commitEdit(rule: Adb.PortForwardingRule, editor: UI.ListWidget.Editor<Adb.PortForwardingRule>, isNew: boolean): void {
|
|
162
162
|
rule.address = editor.control('address').value.trim();
|
|
163
163
|
if (isNew) {
|
|
164
|
-
this
|
|
164
|
+
this.#networkDiscoveryConfig.push(rule);
|
|
165
165
|
}
|
|
166
166
|
this.update();
|
|
167
167
|
}
|
|
@@ -173,12 +173,12 @@ export class NodeConnectionsView extends UI.Widget.VBox implements UI.ListWidget
|
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
private createEditor(): UI.ListWidget.Editor<Adb.PortForwardingRule> {
|
|
176
|
-
if (this
|
|
177
|
-
return this
|
|
176
|
+
if (this.#editor) {
|
|
177
|
+
return this.#editor;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
const editor = new UI.ListWidget.Editor<Adb.PortForwardingRule>();
|
|
181
|
-
this
|
|
181
|
+
this.#editor = editor;
|
|
182
182
|
const content = editor.contentElement();
|
|
183
183
|
const fields = content.createChild('div', 'network-discovery-edit-row');
|
|
184
184
|
const input =
|
|
@@ -204,6 +204,6 @@ export class NodeConnectionsView extends UI.Widget.VBox implements UI.ListWidget
|
|
|
204
204
|
}
|
|
205
205
|
wasShown(): void {
|
|
206
206
|
super.wasShown();
|
|
207
|
-
this
|
|
207
|
+
this.#list.registerCSSFiles([nodeConnectionsPanelStyles]);
|
|
208
208
|
}
|
|
209
209
|
}
|
|
@@ -46,21 +46,21 @@ export class NodeMainImpl implements Common.Runnable.Runnable {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export class NodeChildTargetManager extends SDK.SDKModel.SDKModel<void> implements ProtocolProxyApi.TargetDispatcher {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
readonly #targetManager: SDK.TargetManager.TargetManager;
|
|
50
|
+
readonly #parentTarget: SDK.Target.Target;
|
|
51
|
+
readonly #targetAgent: ProtocolProxyApi.TargetApi;
|
|
52
|
+
readonly #childTargets: Map<Protocol.Target.SessionID, SDK.Target.Target>;
|
|
53
|
+
readonly #childConnections: Map<string, NodeConnection>;
|
|
54
54
|
constructor(parentTarget: SDK.Target.Target) {
|
|
55
55
|
super(parentTarget);
|
|
56
|
-
this
|
|
57
|
-
this
|
|
58
|
-
this
|
|
59
|
-
this
|
|
60
|
-
this
|
|
56
|
+
this.#targetManager = parentTarget.targetManager();
|
|
57
|
+
this.#parentTarget = parentTarget;
|
|
58
|
+
this.#targetAgent = parentTarget.targetAgent();
|
|
59
|
+
this.#childTargets = new Map();
|
|
60
|
+
this.#childConnections = new Map();
|
|
61
61
|
|
|
62
62
|
parentTarget.registerTargetDispatcher(this);
|
|
63
|
-
this
|
|
63
|
+
this.#targetAgent.invoke_setDiscoverTargets({discover: true});
|
|
64
64
|
|
|
65
65
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(
|
|
66
66
|
Host.InspectorFrontendHostAPI.Events.DevicesDiscoveryConfigChanged, this.devicesDiscoveryConfigChanged, this);
|
|
@@ -77,21 +77,21 @@ export class NodeChildTargetManager extends SDK.SDKModel.SDKModel<void> implemen
|
|
|
77
77
|
locations.push({host: parts[0], port: port});
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
this
|
|
80
|
+
this.#targetAgent.invoke_setRemoteLocations({locations});
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
dispose(): void {
|
|
84
84
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.removeEventListener(
|
|
85
85
|
Host.InspectorFrontendHostAPI.Events.DevicesDiscoveryConfigChanged, this.devicesDiscoveryConfigChanged, this);
|
|
86
86
|
|
|
87
|
-
for (const sessionId of this
|
|
87
|
+
for (const sessionId of this.#childTargets.keys()) {
|
|
88
88
|
this.detachedFromTarget({sessionId});
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
targetCreated({targetInfo}: Protocol.Target.TargetCreatedEvent): void {
|
|
93
93
|
if (targetInfo.type === 'node' && !targetInfo.attached) {
|
|
94
|
-
this
|
|
94
|
+
this.#targetAgent.invoke_attachToTarget({targetId: targetInfo.targetId, flatten: false});
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
|
|
@@ -103,25 +103,25 @@ export class NodeChildTargetManager extends SDK.SDKModel.SDKModel<void> implemen
|
|
|
103
103
|
|
|
104
104
|
attachedToTarget({sessionId, targetInfo}: Protocol.Target.AttachedToTargetEvent): void {
|
|
105
105
|
const name = i18nString(UIStrings.nodejsS, {PH1: targetInfo.url});
|
|
106
|
-
const connection = new NodeConnection(this
|
|
107
|
-
this
|
|
108
|
-
const target = this
|
|
109
|
-
targetInfo.targetId, name, SDK.Target.Type.Node, this
|
|
110
|
-
this
|
|
106
|
+
const connection = new NodeConnection(this.#targetAgent, sessionId);
|
|
107
|
+
this.#childConnections.set(sessionId, connection);
|
|
108
|
+
const target = this.#targetManager.createTarget(
|
|
109
|
+
targetInfo.targetId, name, SDK.Target.Type.Node, this.#parentTarget, undefined, undefined, connection);
|
|
110
|
+
this.#childTargets.set(sessionId, target);
|
|
111
111
|
target.runtimeAgent().invoke_runIfWaitingForDebugger();
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
detachedFromTarget({sessionId}: Protocol.Target.DetachedFromTargetEvent): void {
|
|
115
|
-
const childTarget = this
|
|
115
|
+
const childTarget = this.#childTargets.get(sessionId);
|
|
116
116
|
if (childTarget) {
|
|
117
117
|
childTarget.dispose('target terminated');
|
|
118
118
|
}
|
|
119
|
-
this
|
|
120
|
-
this
|
|
119
|
+
this.#childTargets.delete(sessionId);
|
|
120
|
+
this.#childConnections.delete(sessionId);
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
receivedMessageFromTarget({sessionId, message}: Protocol.Target.ReceivedMessageFromTargetEvent): void {
|
|
124
|
-
const connection = this
|
|
124
|
+
const connection = this.#childConnections.get(sessionId);
|
|
125
125
|
const onMessage = connection ? connection.onMessage : null;
|
|
126
126
|
if (onMessage) {
|
|
127
127
|
onMessage.call(null, message);
|
|
@@ -133,15 +133,15 @@ export class NodeChildTargetManager extends SDK.SDKModel.SDKModel<void> implemen
|
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
export class NodeConnection implements ProtocolClient.InspectorBackend.Connection {
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
readonly #targetAgent: ProtocolProxyApi.TargetApi;
|
|
137
|
+
readonly #sessionId: Protocol.Target.SessionID;
|
|
138
138
|
onMessage: ((arg0: (Object|string)) => void)|null;
|
|
139
|
-
|
|
139
|
+
#onDisconnect: ((arg0: string) => void)|null;
|
|
140
140
|
constructor(targetAgent: ProtocolProxyApi.TargetApi, sessionId: Protocol.Target.SessionID) {
|
|
141
|
-
this
|
|
142
|
-
this
|
|
141
|
+
this.#targetAgent = targetAgent;
|
|
142
|
+
this.#sessionId = sessionId;
|
|
143
143
|
this.onMessage = null;
|
|
144
|
-
this
|
|
144
|
+
this.#onDisconnect = null;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
setOnMessage(onMessage: (arg0: (Object|string)) => void): void {
|
|
@@ -149,20 +149,20 @@ export class NodeConnection implements ProtocolClient.InspectorBackend.Connectio
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
setOnDisconnect(onDisconnect: (arg0: string) => void): void {
|
|
152
|
-
this
|
|
152
|
+
this.#onDisconnect = onDisconnect;
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
sendRawMessage(message: string): void {
|
|
156
|
-
this
|
|
156
|
+
this.#targetAgent.invoke_sendMessageToTarget({message, sessionId: this.#sessionId});
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
async disconnect(): Promise<void> {
|
|
160
|
-
if (this
|
|
161
|
-
this
|
|
160
|
+
if (this.#onDisconnect) {
|
|
161
|
+
this.#onDisconnect.call(null, 'force disconnect');
|
|
162
162
|
}
|
|
163
|
-
this
|
|
163
|
+
this.#onDisconnect = null;
|
|
164
164
|
this.onMessage = null;
|
|
165
|
-
await this
|
|
165
|
+
await this.#targetAgent.invoke_detachFromTarget({sessionId: this.#sessionId});
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
|
|
@@ -279,6 +279,9 @@ export function registerCommands(inspectorBackend) {
|
|
|
279
279
|
});
|
|
280
280
|
inspectorBackend.registerEnum(
|
|
281
281
|
'Audits.GenericIssueErrorType', {CrossOriginPortalPostMessageError: 'CrossOriginPortalPostMessageError'});
|
|
282
|
+
inspectorBackend.registerEnum(
|
|
283
|
+
'Audits.ClientHintIssueReason',
|
|
284
|
+
{MetaTagAllowListInvalidOrigin: 'MetaTagAllowListInvalidOrigin', MetaTagModifiedHTML: 'MetaTagModifiedHTML'});
|
|
282
285
|
inspectorBackend.registerEnum('Audits.InspectorIssueCode', {
|
|
283
286
|
SameSiteCookieIssue: 'SameSiteCookieIssue',
|
|
284
287
|
MixedContentIssue: 'MixedContentIssue',
|
|
@@ -294,7 +297,8 @@ export function registerCommands(inspectorBackend) {
|
|
|
294
297
|
NavigatorUserAgentIssue: 'NavigatorUserAgentIssue',
|
|
295
298
|
WasmCrossOriginModuleSharingIssue: 'WasmCrossOriginModuleSharingIssue',
|
|
296
299
|
GenericIssue: 'GenericIssue',
|
|
297
|
-
DeprecationIssue: 'DeprecationIssue'
|
|
300
|
+
DeprecationIssue: 'DeprecationIssue',
|
|
301
|
+
ClientHintIssue: 'ClientHintIssue'
|
|
298
302
|
});
|
|
299
303
|
inspectorBackend.registerEvent('Audits.issueAdded', ['issue']);
|
|
300
304
|
inspectorBackend.registerEnum('Audits.GetEncodedResponseRequestEncoding', {Webp: 'webp', Jpeg: 'jpeg', Png: 'png'});
|
|
@@ -1049,6 +1049,20 @@ declare namespace Protocol {
|
|
|
1049
1049
|
message?: string;
|
|
1050
1050
|
}
|
|
1051
1051
|
|
|
1052
|
+
export const enum ClientHintIssueReason {
|
|
1053
|
+
MetaTagAllowListInvalidOrigin = 'MetaTagAllowListInvalidOrigin',
|
|
1054
|
+
MetaTagModifiedHTML = 'MetaTagModifiedHTML',
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
/**
|
|
1058
|
+
* This issue tracks client hints related issues. It's used to deprecate old
|
|
1059
|
+
* features, encourage the use of new ones, and provide general guidance.
|
|
1060
|
+
*/
|
|
1061
|
+
export interface ClientHintIssueDetails {
|
|
1062
|
+
sourceCodeLocation: SourceCodeLocation;
|
|
1063
|
+
clientHintIssueReason: ClientHintIssueReason;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1052
1066
|
/**
|
|
1053
1067
|
* A unique identifier for the type of issue. Each type may use one of the
|
|
1054
1068
|
* optional fields in InspectorIssueDetails to convey more specific
|
|
@@ -1070,6 +1084,7 @@ declare namespace Protocol {
|
|
|
1070
1084
|
WasmCrossOriginModuleSharingIssue = 'WasmCrossOriginModuleSharingIssue',
|
|
1071
1085
|
GenericIssue = 'GenericIssue',
|
|
1072
1086
|
DeprecationIssue = 'DeprecationIssue',
|
|
1087
|
+
ClientHintIssue = 'ClientHintIssue',
|
|
1073
1088
|
}
|
|
1074
1089
|
|
|
1075
1090
|
/**
|
|
@@ -1093,6 +1108,7 @@ declare namespace Protocol {
|
|
|
1093
1108
|
wasmCrossOriginModuleSharingIssue?: WasmCrossOriginModuleSharingIssueDetails;
|
|
1094
1109
|
genericIssueDetails?: GenericIssueDetails;
|
|
1095
1110
|
deprecationIssueDetails?: DeprecationIssueDetails;
|
|
1111
|
+
clientHintIssueDetails?: ClientHintIssueDetails;
|
|
1096
1112
|
}
|
|
1097
1113
|
|
|
1098
1114
|
/**
|
|
@@ -36,7 +36,7 @@ const str_ = i18n.i18n.registerUIStrings('models/issues_manager/ContentSecurityP
|
|
|
36
36
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
|
37
37
|
|
|
38
38
|
export class ContentSecurityPolicyIssue extends Issue {
|
|
39
|
-
|
|
39
|
+
#issueDetails: Protocol.Audits.ContentSecurityPolicyIssueDetails;
|
|
40
40
|
|
|
41
41
|
constructor(
|
|
42
42
|
issueDetails: Protocol.Audits.ContentSecurityPolicyIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel,
|
|
@@ -46,7 +46,7 @@ export class ContentSecurityPolicyIssue extends Issue {
|
|
|
46
46
|
issueDetails.contentSecurityPolicyViolationType,
|
|
47
47
|
].join('::');
|
|
48
48
|
super(issueCode, issuesModel, issueId);
|
|
49
|
-
this
|
|
49
|
+
this.#issueDetails = issueDetails;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
getCategory(): IssueCategory {
|
|
@@ -54,7 +54,7 @@ export class ContentSecurityPolicyIssue extends Issue {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
primaryKey(): string {
|
|
57
|
-
return JSON.stringify(this
|
|
57
|
+
return JSON.stringify(this.#issueDetails, [
|
|
58
58
|
'blockedURL',
|
|
59
59
|
'contentSecurityPolicyViolationType',
|
|
60
60
|
'violatedDirective',
|
|
@@ -68,7 +68,7 @@ export class ContentSecurityPolicyIssue extends Issue {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
getDescription(): MarkdownIssueDescription|null {
|
|
71
|
-
const description = issueDescriptions.get(this
|
|
71
|
+
const description = issueDescriptions.get(this.#issueDetails.contentSecurityPolicyViolationType);
|
|
72
72
|
if (!description) {
|
|
73
73
|
return null;
|
|
74
74
|
}
|
|
@@ -76,11 +76,11 @@ export class ContentSecurityPolicyIssue extends Issue {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
details(): Protocol.Audits.ContentSecurityPolicyIssueDetails {
|
|
79
|
-
return this
|
|
79
|
+
return this.#issueDetails;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
getKind(): IssueKind {
|
|
83
|
-
if (this
|
|
83
|
+
if (this.#issueDetails.isReportOnly) {
|
|
84
84
|
return IssueKind.Improvement;
|
|
85
85
|
}
|
|
86
86
|
return IssueKind.PageError;
|
|
@@ -9,9 +9,9 @@ import * as SDK from '../../core/sdk/sdk.js';
|
|
|
9
9
|
let contrastCheckTriggerInstance: ContrastCheckTrigger|null = null;
|
|
10
10
|
|
|
11
11
|
export class ContrastCheckTrigger {
|
|
12
|
-
|
|
12
|
+
#pageLoadListeners: WeakMap<SDK.ResourceTreeModel.ResourceTreeModel, Common.EventTarget.EventDescriptor> =
|
|
13
13
|
new WeakMap();
|
|
14
|
-
|
|
14
|
+
#frameAddedListeners: WeakMap<SDK.ResourceTreeModel.ResourceTreeModel, Common.EventTarget.EventDescriptor> =
|
|
15
15
|
new WeakMap();
|
|
16
16
|
|
|
17
17
|
constructor() {
|
|
@@ -27,40 +27,40 @@ export class ContrastCheckTrigger {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
async modelAdded(resourceTreeModel: SDK.ResourceTreeModel.ResourceTreeModel): Promise<void> {
|
|
30
|
-
this
|
|
30
|
+
this.#pageLoadListeners.set(
|
|
31
31
|
resourceTreeModel,
|
|
32
|
-
resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.Load, this
|
|
33
|
-
this
|
|
32
|
+
resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.Load, this.#pageLoaded, this));
|
|
33
|
+
this.#frameAddedListeners.set(
|
|
34
34
|
resourceTreeModel,
|
|
35
|
-
resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.FrameAdded, this
|
|
35
|
+
resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.FrameAdded, this.#frameAdded, this));
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
modelRemoved(resourceTreeModel: SDK.ResourceTreeModel.ResourceTreeModel): void {
|
|
39
|
-
const pageLoadListener = this
|
|
39
|
+
const pageLoadListener = this.#pageLoadListeners.get(resourceTreeModel);
|
|
40
40
|
if (pageLoadListener) {
|
|
41
41
|
Common.EventTarget.removeEventListeners([pageLoadListener]);
|
|
42
42
|
}
|
|
43
|
-
const frameAddedListeners = this
|
|
43
|
+
const frameAddedListeners = this.#frameAddedListeners.get(resourceTreeModel);
|
|
44
44
|
if (frameAddedListeners) {
|
|
45
45
|
Common.EventTarget.removeEventListeners([frameAddedListeners]);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
#checkContrast(resourceTreeModel: SDK.ResourceTreeModel.ResourceTreeModel): void {
|
|
50
50
|
if (!Root.Runtime.experiments.isEnabled('contrastIssues')) {
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
53
|
resourceTreeModel.target().auditsAgent().invoke_checkContrast({});
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
#pageLoaded(event: Common.EventTarget
|
|
57
|
+
.EventTargetEvent<{resourceTreeModel: SDK.ResourceTreeModel.ResourceTreeModel, loadTime: number}>):
|
|
58
|
+
void {
|
|
59
59
|
const {resourceTreeModel} = event.data;
|
|
60
|
-
this
|
|
60
|
+
this.#checkContrast(resourceTreeModel);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
async #frameAdded(event: Common.EventTarget.EventTargetEvent<SDK.ResourceTreeModel.ResourceTreeFrame>):
|
|
64
64
|
Promise<void> {
|
|
65
65
|
if (!Root.Runtime.experiments.isEnabled('contrastIssues')) {
|
|
66
66
|
return;
|
|
@@ -74,7 +74,7 @@ export class ContrastCheckTrigger {
|
|
|
74
74
|
const response = await frame.resourceTreeModel().target().runtimeAgent().invoke_evaluate(
|
|
75
75
|
{expression: 'document.readyState', returnByValue: true});
|
|
76
76
|
if (response.result && response.result.value === 'complete') {
|
|
77
|
-
this
|
|
77
|
+
this.#checkContrast(frame.resourceTreeModel());
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -99,13 +99,13 @@ function getIssueCode(details: Protocol.Audits.CorsIssueDetails): IssueCode {
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
export class CorsIssue extends Issue<IssueCode> {
|
|
102
|
-
|
|
102
|
+
#issueDetails: Protocol.Audits.CorsIssueDetails;
|
|
103
103
|
|
|
104
104
|
constructor(
|
|
105
105
|
issueDetails: Protocol.Audits.CorsIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel,
|
|
106
106
|
issueId: Protocol.Audits.IssueId|undefined) {
|
|
107
107
|
super(getIssueCode(issueDetails), issuesModel, issueId);
|
|
108
|
-
this
|
|
108
|
+
this.#issueDetails = issueDetails;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
getCategory(): IssueCategory {
|
|
@@ -113,11 +113,11 @@ export class CorsIssue extends Issue<IssueCode> {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
details(): Protocol.Audits.CorsIssueDetails {
|
|
116
|
-
return this
|
|
116
|
+
return this.#issueDetails;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
getDescription(): MarkdownIssueDescription|null {
|
|
120
|
-
switch (getIssueCode(this
|
|
120
|
+
switch (getIssueCode(this.#issueDetails)) {
|
|
121
121
|
case IssueCode.InsecurePrivateNetwork:
|
|
122
122
|
return {
|
|
123
123
|
file: 'corsInsecurePrivateNetwork.md',
|
|
@@ -231,15 +231,15 @@ export class CorsIssue extends Issue<IssueCode> {
|
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
primaryKey(): string {
|
|
234
|
-
return JSON.stringify(this
|
|
234
|
+
return JSON.stringify(this.#issueDetails);
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
getKind(): IssueKind {
|
|
238
|
-
if (this
|
|
239
|
-
(this
|
|
240
|
-
this
|
|
238
|
+
if (this.#issueDetails.isWarning &&
|
|
239
|
+
(this.#issueDetails.corsErrorStatus.corsError === Protocol.Network.CorsError.InsecurePrivateNetwork ||
|
|
240
|
+
this.#issueDetails.corsErrorStatus.corsError ===
|
|
241
241
|
Protocol.Network.CorsError.PreflightMissingAllowPrivateNetwork ||
|
|
242
|
-
this
|
|
242
|
+
this.#issueDetails.corsErrorStatus.corsError ===
|
|
243
243
|
Protocol.Network.CorsError.PreflightInvalidAllowPrivateNetwork)) {
|
|
244
244
|
return IssueKind.BreakingChange;
|
|
245
245
|
}
|
|
@@ -40,23 +40,23 @@ export function isCrossOriginEmbedderPolicyIssue(reason: Protocol.Audits.Blocked
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
export class CrossOriginEmbedderPolicyIssue extends Issue {
|
|
43
|
-
|
|
43
|
+
#issueDetails: Protocol.Audits.BlockedByResponseIssueDetails;
|
|
44
44
|
|
|
45
45
|
constructor(issueDetails: Protocol.Audits.BlockedByResponseIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel) {
|
|
46
46
|
super(`CrossOriginEmbedderPolicyIssue::${issueDetails.reason}`, issuesModel);
|
|
47
|
-
this
|
|
47
|
+
this.#issueDetails = issueDetails;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
primaryKey(): string {
|
|
51
|
-
return `${this.code()}-(${this
|
|
51
|
+
return `${this.code()}-(${this.#issueDetails.request.requestId})`;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
getBlockedByResponseDetails(): Iterable<Protocol.Audits.BlockedByResponseIssueDetails> {
|
|
55
|
-
return [this
|
|
55
|
+
return [this.#issueDetails];
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
requests(): Iterable<Protocol.Audits.AffectedRequest> {
|
|
59
|
-
return [this
|
|
59
|
+
return [this.#issueDetails.request];
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
getCategory(): IssueCategory {
|