chrome-devtools-frontend 1.0.1660788 → 1.0.1662289
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/.agents/skills/evaluate-ai-css-completion/SKILL.md +143 -0
- package/.agents/skills/evaluate-ai-css-completion/scripts/evaluate.js +104 -0
- package/.agents/skills/migrate-chromium-test/SKILL.md +7 -2
- package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +7 -1
- package/docs/ui_engineering.md +75 -42
- package/eslint.config.mjs +7 -0
- package/extension-api/ExtensionAPI.d.ts +88 -0
- package/front_end/core/common/SettingRegistration.ts +0 -5
- package/front_end/core/host/InspectorFrontendHost.ts +1 -0
- package/front_end/core/host/InspectorFrontendHostStub.ts +2 -0
- package/front_end/core/platform/ArrayUtilities.ts +10 -0
- package/front_end/core/platform/StringUtilities.ts +20 -4
- package/front_end/core/sdk/CPUThrottlingManager.ts +2 -0
- package/front_end/core/sdk/DOMDebuggerModel.ts +2 -0
- package/front_end/core/sdk/DOMModel.ts +1 -0
- package/front_end/core/sdk/DebuggerModel.ts +4 -4
- package/front_end/core/sdk/EventBreakpointsModel.ts +2 -0
- package/front_end/core/sdk/FrameManager.ts +1 -0
- package/front_end/core/sdk/IsolateManager.ts +1 -0
- package/front_end/core/sdk/NetworkManager.ts +2 -0
- package/front_end/core/sdk/NetworkRequest.ts +1 -0
- package/front_end/core/sdk/PageResourceLoader.ts +2 -0
- package/front_end/core/sdk/SourceMap.ts +5 -5
- package/front_end/core/sdk/SourceMapManager.ts +3 -2
- package/front_end/core/sdk/TargetManager.ts +4 -0
- package/front_end/entrypoints/main/MainImpl.ts +2 -1
- package/front_end/foundation/README.md +86 -0
- package/front_end/generated/InspectorBackendCommands.ts +4 -5
- package/front_end/generated/protocol.ts +20 -38
- package/front_end/models/bindings/CompilerScriptMapping.ts +5 -5
- package/front_end/models/bindings/ContentProviderBasedProject.ts +2 -3
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +3 -3
- package/front_end/models/bindings/DefaultScriptMapping.ts +3 -3
- package/front_end/models/bindings/ResourceMapping.ts +3 -3
- package/front_end/models/bindings/ResourceScriptMapping.ts +2 -2
- package/front_end/models/bindings/SASSSourceMapping.ts +3 -3
- package/front_end/models/bindings/TempFile.ts +8 -3
- package/front_end/models/extensions/ExtensionAPI.ts +110 -46
- package/front_end/models/extensions/RecorderExtensionEndpoint.ts +7 -5
- package/front_end/models/formatter/ScriptFormatter.ts +8 -11
- package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +14 -5
- package/front_end/models/issues_manager/CheckFormsIssuesTrigger.ts +8 -9
- package/front_end/models/issues_manager/CookieIssue.ts +21 -9
- package/front_end/models/issues_manager/Issue.ts +3 -4
- package/front_end/models/issues_manager/IssueAggregator.ts +0 -9
- package/front_end/models/issues_manager/IssueResolver.ts +2 -2
- package/front_end/models/issues_manager/IssuesManager.ts +136 -137
- package/front_end/models/issues_manager/RelatedIssue.ts +10 -8
- package/front_end/models/issues_manager/issues_manager.ts +0 -2
- package/front_end/models/javascript_metadata/NativeFunctions.js +1 -1
- package/front_end/models/logs/RequestResolver.ts +2 -2
- package/front_end/models/source_map_scopes/FunctionCodeResolver.ts +12 -9
- package/front_end/models/trace/handlers/FramesHandler.ts +4 -7
- package/front_end/models/trace/handlers/ModelHandlers.ts +0 -1
- package/front_end/models/trace/handlers/RendererHandler.ts +2 -15
- package/front_end/models/trace/handlers/Threads.ts +4 -11
- package/front_end/models/trace/insights/DOMSize.ts +1 -1
- package/front_end/models/workspace_diff/WorkspaceDiff.ts +10 -4
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +2 -1
- package/front_end/panels/application/ApplicationPanelSidebar.ts +0 -44
- package/front_end/panels/application/CookieItemsView.ts +1 -1
- package/front_end/panels/application/ServiceWorkersView.ts +494 -411
- package/front_end/panels/application/WebMCPView.ts +38 -43
- package/front_end/panels/application/application.ts +0 -6
- package/front_end/panels/application/components/AdsView.ts +201 -30
- package/front_end/panels/application/components/adsView.css +25 -0
- package/front_end/panels/application/components/components.ts +0 -2
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +1 -1
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +2 -2
- package/front_end/panels/application/serviceWorkersView.css +40 -4
- package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +147 -123
- package/front_end/panels/common/ExtensionServer.ts +3 -3
- package/front_end/panels/console/ConsoleView.ts +3 -2
- package/front_end/panels/console/PromptBuilder.ts +2 -1
- package/front_end/panels/emulation/DeviceModeView.ts +164 -113
- package/front_end/panels/issues/AffectedResourcesView.ts +1 -1
- package/front_end/panels/issues/IssueView.ts +0 -2
- package/front_end/panels/issues/IssuesPane.ts +1 -8
- package/front_end/panels/js_timeline/js_timeline-meta.ts +3 -2
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +53 -12
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorController.ts +3 -3
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +5 -5
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +4 -4
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +2 -2
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts +6 -6
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +3 -3
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplay.ts +8 -9
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplayUtils.ts +2 -2
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterSettings.ts +1 -1
- package/front_end/panels/linear_memory_inspector/linear_memory_inspector-meta.ts +2 -2
- package/front_end/panels/network/RequestPayloadView.ts +92 -52
- package/front_end/panels/network/RequestTimingView.ts +95 -127
- package/front_end/panels/network/components/ResponseHeaderSection.ts +5 -3
- package/front_end/panels/profiler/HeapSnapshotView.ts +3 -3
- package/front_end/panels/profiler/WritableProfileHeader.ts +2 -2
- package/front_end/panels/recorder/{components/ControlButton.ts → ControlButton.ts} +9 -10
- package/front_end/panels/recorder/{components/CreateRecordingView.ts → CreateRecordingView.ts} +48 -47
- package/front_end/panels/recorder/{components/ExtensionView.ts → ExtensionView.ts} +8 -8
- package/front_end/panels/recorder/RecorderController.ts +302 -127
- package/front_end/panels/recorder/RecorderPanel.ts +1 -1
- package/front_end/panels/recorder/{components/RecordingListView.ts → RecordingListView.ts} +19 -20
- package/front_end/panels/recorder/{components/RecordingView.ts → RecordingView.ts} +88 -88
- package/front_end/panels/recorder/{components/ReplaySection.ts → ReplaySection.ts} +11 -11
- package/front_end/panels/recorder/{components/SelectorPicker.ts → SelectorPicker.ts} +13 -13
- package/front_end/panels/recorder/{components/StepEditor.ts → StepEditor.ts} +15 -15
- package/front_end/panels/recorder/{components/StepView.ts → StepView.ts} +10 -10
- package/front_end/panels/recorder/{components/TimelineSection.ts → TimelineSection.ts} +2 -2
- package/front_end/panels/recorder/recorder.ts +23 -1
- package/front_end/panels/recorder/util/util.ts +113 -0
- package/front_end/panels/sources/SourcesView.ts +0 -17
- package/front_end/panels/sources/TabbedEditorContainer.ts +1 -1
- package/front_end/panels/sources/UISourceCodeFrame.ts +42 -0
- package/front_end/panels/sources/sources.ts +0 -2
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +0 -17
- package/front_end/panels/timeline/IsolateSelector.ts +10 -8
- package/front_end/panels/timeline/ThreadAppender.ts +0 -106
- package/front_end/panels/timeline/TimelinePanel.ts +18 -7
- package/front_end/panels/timeline/TimelineUIUtils.ts +144 -129
- package/front_end/panels/timeline/timeline-meta.ts +3 -2
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/report_view/ReportView.ts +11 -5
- package/front_end/ui/components/report_view/report.css +4 -1
- package/front_end/ui/legacy/TextPrompt.ts +49 -1
- package/front_end/ui/legacy/Treeoutline.ts +3 -0
- package/front_end/ui/legacy/UIUtils.ts +11 -1
- package/front_end/ui/legacy/Widget.ts +14 -15
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +2 -2
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +11 -7
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +2 -1
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +10 -1
- package/front_end/ui/legacy/textPrompt.css +10 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +1 -1
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +0 -247
- package/front_end/models/issues_manager/descriptions/arInsecureContext.md +0 -7
- package/front_end/models/issues_manager/descriptions/arInvalidInfoHeader.md +0 -5
- package/front_end/models/issues_manager/descriptions/arInvalidRegisterOsSourceHeader.md +0 -5
- package/front_end/models/issues_manager/descriptions/arInvalidRegisterOsTriggerHeader.md +0 -5
- package/front_end/models/issues_manager/descriptions/arInvalidRegisterSourceHeader.md +0 -5
- package/front_end/models/issues_manager/descriptions/arInvalidRegisterTriggerHeader.md +0 -5
- package/front_end/models/issues_manager/descriptions/arNavigationRegistrationUniqueScopeAlreadySet.md +0 -5
- package/front_end/models/issues_manager/descriptions/arNavigationRegistrationWithoutTransientUserActivation.md +0 -6
- package/front_end/models/issues_manager/descriptions/arNoRegisterOsSourceHeader.md +0 -5
- package/front_end/models/issues_manager/descriptions/arNoRegisterOsTriggerHeader.md +0 -5
- package/front_end/models/issues_manager/descriptions/arNoRegisterSourceHeader.md +0 -5
- package/front_end/models/issues_manager/descriptions/arNoRegisterTriggerHeader.md +0 -5
- package/front_end/models/issues_manager/descriptions/arNoWebOrOsSupport.md +0 -4
- package/front_end/models/issues_manager/descriptions/arOsSourceIgnored.md +0 -18
- package/front_end/models/issues_manager/descriptions/arOsTriggerIgnored.md +0 -19
- package/front_end/models/issues_manager/descriptions/arPermissionPolicyDisabled.md +0 -8
- package/front_end/models/issues_manager/descriptions/arSourceAndTriggerHeaders.md +0 -9
- package/front_end/models/issues_manager/descriptions/arSourceIgnored.md +0 -13
- package/front_end/models/issues_manager/descriptions/arTriggerIgnored.md +0 -12
- package/front_end/models/issues_manager/descriptions/arUntrustworthyReportingOrigin.md +0 -10
- package/front_end/models/issues_manager/descriptions/arWebAndOsHeaders.md +0 -11
- package/front_end/models/trace/handlers/AuctionWorkletsHandler.ts +0 -183
- package/front_end/panels/application/InterestGroupStorageModel.ts +0 -81
- package/front_end/panels/application/InterestGroupStorageView.ts +0 -151
- package/front_end/panels/application/InterestGroupTreeElement.ts +0 -65
- package/front_end/panels/application/components/InterestGroupAccessGrid.ts +0 -135
- package/front_end/panels/application/components/interestGroupAccessGrid.css +0 -27
- package/front_end/panels/application/interestGroupStorageView.css +0 -9
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +0 -182
- package/front_end/panels/recorder/components/components.ts +0 -25
- package/front_end/panels/recorder/components/util.ts +0 -116
- package/front_end/panels/sources/InplaceFormatterEditorAction.ts +0 -149
- /package/front_end/panels/recorder/{components/controlButton.css → controlButton.css} +0 -0
- /package/front_end/panels/recorder/{components/createRecordingView.css → createRecordingView.css} +0 -0
- /package/front_end/panels/recorder/{components/extensionView.css → extensionView.css} +0 -0
- /package/front_end/panels/recorder/{components/recordingListView.css → recordingListView.css} +0 -0
- /package/front_end/panels/recorder/{components/recordingView.css → recordingView.css} +0 -0
- /package/front_end/panels/recorder/{components/replaySection.css → replaySection.css} +0 -0
- /package/front_end/panels/recorder/{components/selectorPicker.css → selectorPicker.css} +0 -0
- /package/front_end/panels/recorder/{components/startView.css → startView.css} +0 -0
- /package/front_end/panels/recorder/{components/stepEditor.css → stepEditor.css} +0 -0
- /package/front_end/panels/recorder/{components/stepView.css → stepView.css} +0 -0
- /package/front_end/panels/recorder/{components/timelineSection.css → timelineSection.css} +0 -0
|
@@ -83,7 +83,6 @@ inspectorBackend.registerEnum("Audits.HeavyAdResolutionStatus", {HeavyAdBlocked:
|
|
|
83
83
|
inspectorBackend.registerEnum("Audits.HeavyAdReason", {NetworkTotalLimit: "NetworkTotalLimit", CpuTotalLimit: "CpuTotalLimit", CpuPeakLimit: "CpuPeakLimit"});
|
|
84
84
|
inspectorBackend.registerEnum("Audits.ContentSecurityPolicyViolationType", {KInlineViolation: "kInlineViolation", KEvalViolation: "kEvalViolation", KURLViolation: "kURLViolation", KSRIViolation: "kSRIViolation", KTrustedTypesSinkViolation: "kTrustedTypesSinkViolation", KTrustedTypesPolicyViolation: "kTrustedTypesPolicyViolation", KWasmEvalViolation: "kWasmEvalViolation"});
|
|
85
85
|
inspectorBackend.registerEnum("Audits.SharedArrayBufferIssueType", {TransferIssue: "TransferIssue", CreationIssue: "CreationIssue"});
|
|
86
|
-
inspectorBackend.registerEnum("Audits.AttributionReportingIssueType", {PermissionPolicyDisabled: "PermissionPolicyDisabled", UntrustworthyReportingOrigin: "UntrustworthyReportingOrigin", InsecureContext: "InsecureContext", InvalidHeader: "InvalidHeader", InvalidRegisterTriggerHeader: "InvalidRegisterTriggerHeader", SourceAndTriggerHeaders: "SourceAndTriggerHeaders", SourceIgnored: "SourceIgnored", TriggerIgnored: "TriggerIgnored", OsSourceIgnored: "OsSourceIgnored", OsTriggerIgnored: "OsTriggerIgnored", InvalidRegisterOsSourceHeader: "InvalidRegisterOsSourceHeader", InvalidRegisterOsTriggerHeader: "InvalidRegisterOsTriggerHeader", WebAndOsHeaders: "WebAndOsHeaders", NoWebOrOsSupport: "NoWebOrOsSupport", NavigationRegistrationWithoutTransientUserActivation: "NavigationRegistrationWithoutTransientUserActivation", InvalidInfoHeader: "InvalidInfoHeader", NoRegisterSourceHeader: "NoRegisterSourceHeader", NoRegisterTriggerHeader: "NoRegisterTriggerHeader", NoRegisterOsSourceHeader: "NoRegisterOsSourceHeader", NoRegisterOsTriggerHeader: "NoRegisterOsTriggerHeader", NavigationRegistrationUniqueScopeAlreadySet: "NavigationRegistrationUniqueScopeAlreadySet"});
|
|
87
86
|
inspectorBackend.registerEnum("Audits.SharedDictionaryError", {UseErrorCrossOriginNoCorsRequest: "UseErrorCrossOriginNoCorsRequest", UseErrorDictionaryLoadFailure: "UseErrorDictionaryLoadFailure", UseErrorMatchingDictionaryNotUsed: "UseErrorMatchingDictionaryNotUsed", UseErrorUnexpectedContentDictionaryHeader: "UseErrorUnexpectedContentDictionaryHeader", WriteErrorCossOriginNoCorsRequest: "WriteErrorCossOriginNoCorsRequest", WriteErrorDisallowedBySettings: "WriteErrorDisallowedBySettings", WriteErrorExpiredResponse: "WriteErrorExpiredResponse", WriteErrorFeatureDisabled: "WriteErrorFeatureDisabled", WriteErrorInsufficientResources: "WriteErrorInsufficientResources", WriteErrorInvalidMatchField: "WriteErrorInvalidMatchField", WriteErrorInvalidStructuredHeader: "WriteErrorInvalidStructuredHeader", WriteErrorInvalidTTLField: "WriteErrorInvalidTTLField", WriteErrorNavigationRequest: "WriteErrorNavigationRequest", WriteErrorNoMatchField: "WriteErrorNoMatchField", WriteErrorNonIntegerTTLField: "WriteErrorNonIntegerTTLField", WriteErrorNonListMatchDestField: "WriteErrorNonListMatchDestField", WriteErrorNonSecureContext: "WriteErrorNonSecureContext", WriteErrorNonStringIdField: "WriteErrorNonStringIdField", WriteErrorNonStringInMatchDestList: "WriteErrorNonStringInMatchDestList", WriteErrorInvalidMatchDestList: "WriteErrorInvalidMatchDestList", WriteErrorNonStringMatchField: "WriteErrorNonStringMatchField", WriteErrorNonTokenTypeField: "WriteErrorNonTokenTypeField", WriteErrorRequestAborted: "WriteErrorRequestAborted", WriteErrorShuttingDown: "WriteErrorShuttingDown", WriteErrorTooLongIdField: "WriteErrorTooLongIdField", WriteErrorUnsupportedType: "WriteErrorUnsupportedType"});
|
|
88
87
|
inspectorBackend.registerEnum("Audits.SRIMessageSignatureError", {MissingSignatureHeader: "MissingSignatureHeader", MissingSignatureInputHeader: "MissingSignatureInputHeader", InvalidSignatureHeader: "InvalidSignatureHeader", InvalidSignatureInputHeader: "InvalidSignatureInputHeader", SignatureHeaderValueIsNotByteSequence: "SignatureHeaderValueIsNotByteSequence", SignatureHeaderValueIsParameterized: "SignatureHeaderValueIsParameterized", SignatureHeaderValueIsIncorrectLength: "SignatureHeaderValueIsIncorrectLength", SignatureInputHeaderMissingLabel: "SignatureInputHeaderMissingLabel", SignatureInputHeaderValueNotInnerList: "SignatureInputHeaderValueNotInnerList", SignatureInputHeaderValueMissingComponents: "SignatureInputHeaderValueMissingComponents", SignatureInputHeaderInvalidComponentType: "SignatureInputHeaderInvalidComponentType", SignatureInputHeaderInvalidComponentName: "SignatureInputHeaderInvalidComponentName", SignatureInputHeaderInvalidHeaderComponentParameter: "SignatureInputHeaderInvalidHeaderComponentParameter", SignatureInputHeaderInvalidDerivedComponentParameter: "SignatureInputHeaderInvalidDerivedComponentParameter", SignatureInputHeaderKeyIdLength: "SignatureInputHeaderKeyIdLength", SignatureInputHeaderInvalidParameter: "SignatureInputHeaderInvalidParameter", SignatureInputHeaderMissingRequiredParameters: "SignatureInputHeaderMissingRequiredParameters", ValidationFailedSignatureExpired: "ValidationFailedSignatureExpired", ValidationFailedInvalidLength: "ValidationFailedInvalidLength", ValidationFailedSignatureMismatch: "ValidationFailedSignatureMismatch", ValidationFailedIntegrityMismatch: "ValidationFailedIntegrityMismatch", SignatureBaseUnknownDerivedComponent: "SignatureBaseUnknownDerivedComponent", SignatureBaseMissingHeader: "SignatureBaseMissingHeader", SignatureBaseInvalidUnencodedDigest: "SignatureBaseInvalidUnencodedDigest", SignatureBaseUnsupportedComponent: "SignatureBaseUnsupportedComponent"});
|
|
89
88
|
inspectorBackend.registerEnum("Audits.UnencodedDigestError", {MalformedDictionary: "MalformedDictionary", UnknownAlgorithm: "UnknownAlgorithm", IncorrectDigestType: "IncorrectDigestType", IncorrectDigestLength: "IncorrectDigestLength"});
|
|
@@ -99,7 +98,7 @@ inspectorBackend.registerEnum("Audits.StyleSheetLoadingIssueReason", {LateImport
|
|
|
99
98
|
inspectorBackend.registerEnum("Audits.PropertyRuleIssueReason", {InvalidSyntax: "InvalidSyntax", InvalidInitialValue: "InvalidInitialValue", InvalidInherits: "InvalidInherits", InvalidName: "InvalidName"});
|
|
100
99
|
inspectorBackend.registerEnum("Audits.UserReidentificationIssueType", {BlockedFrameNavigation: "BlockedFrameNavigation", BlockedSubresource: "BlockedSubresource", NoisedCanvasReadback: "NoisedCanvasReadback"});
|
|
101
100
|
inspectorBackend.registerEnum("Audits.PermissionElementIssueType", {InvalidType: "InvalidType", FencedFrameDisallowed: "FencedFrameDisallowed", CspFrameAncestorsMissing: "CspFrameAncestorsMissing", PermissionsPolicyBlocked: "PermissionsPolicyBlocked", PaddingRightUnsupported: "PaddingRightUnsupported", PaddingBottomUnsupported: "PaddingBottomUnsupported", InsetBoxShadowUnsupported: "InsetBoxShadowUnsupported", RequestInProgress: "RequestInProgress", UntrustedEvent: "UntrustedEvent", RegistrationFailed: "RegistrationFailed", TypeNotSupported: "TypeNotSupported", InvalidTypeActivation: "InvalidTypeActivation", SecurityChecksFailed: "SecurityChecksFailed", ActivationDisabled: "ActivationDisabled", GeolocationDeprecated: "GeolocationDeprecated", InvalidDisplayStyle: "InvalidDisplayStyle", NonOpaqueColor: "NonOpaqueColor", LowContrast: "LowContrast", FontSizeTooSmall: "FontSizeTooSmall", FontSizeTooLarge: "FontSizeTooLarge", InvalidSizeValue: "InvalidSizeValue", NonSecureContext: "NonSecureContext", MissingTransientUserActivation: "MissingTransientUserActivation"});
|
|
102
|
-
inspectorBackend.registerEnum("Audits.InspectorIssueCode", {CookieIssue: "CookieIssue", MixedContentIssue: "MixedContentIssue", BlockedByResponseIssue: "BlockedByResponseIssue", HeavyAdIssue: "HeavyAdIssue", ContentSecurityPolicyIssue: "ContentSecurityPolicyIssue", SharedArrayBufferIssue: "SharedArrayBufferIssue", CorsIssue: "CorsIssue",
|
|
101
|
+
inspectorBackend.registerEnum("Audits.InspectorIssueCode", {CookieIssue: "CookieIssue", MixedContentIssue: "MixedContentIssue", BlockedByResponseIssue: "BlockedByResponseIssue", HeavyAdIssue: "HeavyAdIssue", ContentSecurityPolicyIssue: "ContentSecurityPolicyIssue", SharedArrayBufferIssue: "SharedArrayBufferIssue", CorsIssue: "CorsIssue", QuirksModeIssue: "QuirksModeIssue", PartitioningBlobURLIssue: "PartitioningBlobURLIssue", NavigatorUserAgentIssue: "NavigatorUserAgentIssue", GenericIssue: "GenericIssue", DeprecationIssue: "DeprecationIssue", ClientHintIssue: "ClientHintIssue", FederatedAuthRequestIssue: "FederatedAuthRequestIssue", BounceTrackingIssue: "BounceTrackingIssue", CookieDeprecationMetadataIssue: "CookieDeprecationMetadataIssue", StylesheetLoadingIssue: "StylesheetLoadingIssue", FederatedAuthUserInfoRequestIssue: "FederatedAuthUserInfoRequestIssue", PropertyRuleIssue: "PropertyRuleIssue", SharedDictionaryIssue: "SharedDictionaryIssue", ElementAccessibilityIssue: "ElementAccessibilityIssue", SRIMessageSignatureIssue: "SRIMessageSignatureIssue", UnencodedDigestIssue: "UnencodedDigestIssue", ConnectionAllowlistIssue: "ConnectionAllowlistIssue", UserReidentificationIssue: "UserReidentificationIssue", PermissionElementIssue: "PermissionElementIssue", PerformanceIssue: "PerformanceIssue", SelectivePermissionsInterventionIssue: "SelectivePermissionsInterventionIssue", EmailVerificationRequestIssue: "EmailVerificationRequestIssue", LazyLoadImageIssue: "LazyLoadImageIssue"});
|
|
103
102
|
inspectorBackend.registerEvent("Audits.issueAdded", ["issue"]);
|
|
104
103
|
inspectorBackend.registerEnum("Audits.GetEncodedResponseRequestEncoding", {Webp: "webp", Jpeg: "jpeg", Png: "png"});
|
|
105
104
|
inspectorBackend.registerCommand("Audits.getEncodedResponse", [{"name": "requestId", "type": "string", "optional": false, "description": "Identifier of the network request to get content for.", "typeRef": "Network.RequestId"}, {"name": "encoding", "type": "string", "optional": false, "description": "The encoding to use.", "typeRef": "Audits.GetEncodedResponseRequestEncoding"}, {"name": "quality", "type": "number", "optional": true, "description": "The quality of the encoding (0-1). (defaults to 1)", "typeRef": null}, {"name": "sizeOnly", "type": "boolean", "optional": true, "description": "Whether to only return the size information (defaults to false).", "typeRef": null}], ["body", "originalSize", "encodedSize"], "Returns the response body and size if it were re-encoded with the specified settings. Only applies to images.");
|
|
@@ -119,7 +118,6 @@ inspectorBackend.registerType("Audits.SourceCodeLocation", [{"name": "scriptId",
|
|
|
119
118
|
inspectorBackend.registerType("Audits.ContentSecurityPolicyIssueDetails", [{"name": "blockedURL", "type": "string", "optional": true, "description": "The url not included in allowed sources.", "typeRef": null}, {"name": "violatedDirective", "type": "string", "optional": false, "description": "Specific directive that is violated, causing the CSP issue.", "typeRef": null}, {"name": "isReportOnly", "type": "boolean", "optional": false, "description": "", "typeRef": null}, {"name": "contentSecurityPolicyViolationType", "type": "string", "optional": false, "description": "", "typeRef": "Audits.ContentSecurityPolicyViolationType"}, {"name": "frameAncestor", "type": "object", "optional": true, "description": "", "typeRef": "Audits.AffectedFrame"}, {"name": "sourceCodeLocation", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SourceCodeLocation"}, {"name": "violatingNodeId", "type": "number", "optional": true, "description": "", "typeRef": "DOM.BackendNodeId"}]);
|
|
120
119
|
inspectorBackend.registerType("Audits.SharedArrayBufferIssueDetails", [{"name": "sourceCodeLocation", "type": "object", "optional": false, "description": "", "typeRef": "Audits.SourceCodeLocation"}, {"name": "isWarning", "type": "boolean", "optional": false, "description": "", "typeRef": null}, {"name": "type", "type": "string", "optional": false, "description": "", "typeRef": "Audits.SharedArrayBufferIssueType"}]);
|
|
121
120
|
inspectorBackend.registerType("Audits.CorsIssueDetails", [{"name": "corsErrorStatus", "type": "object", "optional": false, "description": "", "typeRef": "Network.CorsErrorStatus"}, {"name": "isWarning", "type": "boolean", "optional": false, "description": "", "typeRef": null}, {"name": "request", "type": "object", "optional": false, "description": "", "typeRef": "Audits.AffectedRequest"}, {"name": "location", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SourceCodeLocation"}, {"name": "initiatorOrigin", "type": "string", "optional": true, "description": "", "typeRef": null}, {"name": "resourceIPAddressSpace", "type": "string", "optional": true, "description": "", "typeRef": "Network.IPAddressSpace"}, {"name": "clientSecurityState", "type": "object", "optional": true, "description": "", "typeRef": "Network.ClientSecurityState"}]);
|
|
122
|
-
inspectorBackend.registerType("Audits.AttributionReportingIssueDetails", [{"name": "violationType", "type": "string", "optional": false, "description": "", "typeRef": "Audits.AttributionReportingIssueType"}, {"name": "request", "type": "object", "optional": true, "description": "", "typeRef": "Audits.AffectedRequest"}, {"name": "violatingNodeId", "type": "number", "optional": true, "description": "", "typeRef": "DOM.BackendNodeId"}, {"name": "invalidParameter", "type": "string", "optional": true, "description": "", "typeRef": null}]);
|
|
123
121
|
inspectorBackend.registerType("Audits.QuirksModeIssueDetails", [{"name": "isLimitedQuirksMode", "type": "boolean", "optional": false, "description": "If false, it means the document's mode is \\\"quirks\\\" instead of \\\"limited-quirks\\\".", "typeRef": null}, {"name": "documentNodeId", "type": "number", "optional": false, "description": "", "typeRef": "DOM.BackendNodeId"}, {"name": "url", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "frameId", "type": "string", "optional": false, "description": "", "typeRef": "Page.FrameId"}, {"name": "loaderId", "type": "string", "optional": false, "description": "", "typeRef": "Network.LoaderId"}]);
|
|
124
122
|
inspectorBackend.registerType("Audits.NavigatorUserAgentIssueDetails", [{"name": "url", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "location", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SourceCodeLocation"}]);
|
|
125
123
|
inspectorBackend.registerType("Audits.SharedDictionaryIssueDetails", [{"name": "sharedDictionaryError", "type": "string", "optional": false, "description": "", "typeRef": "Audits.SharedDictionaryError"}, {"name": "request", "type": "object", "optional": false, "description": "", "typeRef": "Audits.AffectedRequest"}]);
|
|
@@ -142,7 +140,8 @@ inspectorBackend.registerType("Audits.PropertyRuleIssueDetails", [{"name": "sour
|
|
|
142
140
|
inspectorBackend.registerType("Audits.UserReidentificationIssueDetails", [{"name": "type", "type": "string", "optional": false, "description": "", "typeRef": "Audits.UserReidentificationIssueType"}, {"name": "request", "type": "object", "optional": true, "description": "Applies to BlockedFrameNavigation and BlockedSubresource issue types.", "typeRef": "Audits.AffectedRequest"}, {"name": "sourceCodeLocation", "type": "object", "optional": true, "description": "Applies to NoisedCanvasReadback issue type.", "typeRef": "Audits.SourceCodeLocation"}]);
|
|
143
141
|
inspectorBackend.registerType("Audits.PermissionElementIssueDetails", [{"name": "issueType", "type": "string", "optional": false, "description": "", "typeRef": "Audits.PermissionElementIssueType"}, {"name": "type", "type": "string", "optional": true, "description": "The value of the type attribute.", "typeRef": null}, {"name": "nodeId", "type": "number", "optional": true, "description": "The node ID of the <permission> element.", "typeRef": "DOM.BackendNodeId"}, {"name": "isWarning", "type": "boolean", "optional": true, "description": "True if the issue is a warning, false if it is an error.", "typeRef": null}, {"name": "permissionName", "type": "string", "optional": true, "description": "Fields for message construction: Used for messages that reference a specific permission name", "typeRef": null}, {"name": "occluderNodeInfo", "type": "string", "optional": true, "description": "Used for messages about occlusion", "typeRef": null}, {"name": "occluderParentNodeInfo", "type": "string", "optional": true, "description": "Used for messages about occluder's parent", "typeRef": null}, {"name": "disableReason", "type": "string", "optional": true, "description": "Used for messages about activation disabled reason", "typeRef": null}]);
|
|
144
142
|
inspectorBackend.registerType("Audits.SelectivePermissionsInterventionIssueDetails", [{"name": "apiName", "type": "string", "optional": false, "description": "Which API was intervened on.", "typeRef": null}, {"name": "adAncestry", "type": "object", "optional": false, "description": "Why the ad script using the API is considered an ad.", "typeRef": "Network.AdAncestry"}, {"name": "stackTrace", "type": "object", "optional": true, "description": "The stack trace at the time of the intervention.", "typeRef": "Runtime.StackTrace"}]);
|
|
145
|
-
inspectorBackend.registerType("Audits.
|
|
143
|
+
inspectorBackend.registerType("Audits.LazyLoadImageIssueDetails", [{"name": "nodeId", "type": "number", "optional": false, "description": "DOM node of the problematic HTMLImageElement.", "typeRef": "DOM.BackendNodeId"}, {"name": "url", "type": "string", "optional": false, "description": "URL or src attribute of the image.", "typeRef": null}, {"name": "frameId", "type": "string", "optional": false, "description": "Frame containing the image.", "typeRef": "Page.FrameId"}]);
|
|
144
|
+
inspectorBackend.registerType("Audits.InspectorIssueDetails", [{"name": "cookieIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CookieIssueDetails"}, {"name": "mixedContentIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.MixedContentIssueDetails"}, {"name": "blockedByResponseIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.BlockedByResponseIssueDetails"}, {"name": "heavyAdIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.HeavyAdIssueDetails"}, {"name": "contentSecurityPolicyIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ContentSecurityPolicyIssueDetails"}, {"name": "sharedArrayBufferIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SharedArrayBufferIssueDetails"}, {"name": "corsIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CorsIssueDetails"}, {"name": "quirksModeIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.QuirksModeIssueDetails"}, {"name": "partitioningBlobURLIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PartitioningBlobURLIssueDetails"}, {"name": "navigatorUserAgentIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.NavigatorUserAgentIssueDetails"}, {"name": "genericIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.GenericIssueDetails"}, {"name": "deprecationIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.DeprecationIssueDetails"}, {"name": "clientHintIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ClientHintIssueDetails"}, {"name": "federatedAuthRequestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.FederatedAuthRequestIssueDetails"}, {"name": "bounceTrackingIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.BounceTrackingIssueDetails"}, {"name": "cookieDeprecationMetadataIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CookieDeprecationMetadataIssueDetails"}, {"name": "stylesheetLoadingIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.StylesheetLoadingIssueDetails"}, {"name": "propertyRuleIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PropertyRuleIssueDetails"}, {"name": "federatedAuthUserInfoRequestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.FederatedAuthUserInfoRequestIssueDetails"}, {"name": "sharedDictionaryIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SharedDictionaryIssueDetails"}, {"name": "elementAccessibilityIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ElementAccessibilityIssueDetails"}, {"name": "sriMessageSignatureIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SRIMessageSignatureIssueDetails"}, {"name": "unencodedDigestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.UnencodedDigestIssueDetails"}, {"name": "connectionAllowlistIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ConnectionAllowlistIssueDetails"}, {"name": "userReidentificationIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.UserReidentificationIssueDetails"}, {"name": "permissionElementIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PermissionElementIssueDetails"}, {"name": "performanceIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PerformanceIssueDetails"}, {"name": "selectivePermissionsInterventionIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SelectivePermissionsInterventionIssueDetails"}, {"name": "emailVerificationRequestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.EmailVerificationRequestIssueDetails"}, {"name": "lazyLoadImageIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.LazyLoadImageIssueDetails"}]);
|
|
146
145
|
inspectorBackend.registerType("Audits.InspectorIssue", [{"name": "code", "type": "string", "optional": false, "description": "", "typeRef": "Audits.InspectorIssueCode"}, {"name": "details", "type": "object", "optional": false, "description": "", "typeRef": "Audits.InspectorIssueDetails"}, {"name": "issueId", "type": "string", "optional": true, "description": "A unique id for this issue. May be omitted if no other entity (e.g. exception, CDP message, etc.) is referencing this issue.", "typeRef": "Audits.IssueId"}]);
|
|
147
146
|
|
|
148
147
|
// Autofill.
|
|
@@ -1047,7 +1046,7 @@ inspectorBackend.registerEnum("Page.AdFrameExplanation", {ParentIsAd: "ParentIsA
|
|
|
1047
1046
|
inspectorBackend.registerEnum("Page.SecureContextType", {Secure: "Secure", SecureLocalhost: "SecureLocalhost", InsecureScheme: "InsecureScheme", InsecureAncestor: "InsecureAncestor"});
|
|
1048
1047
|
inspectorBackend.registerEnum("Page.CrossOriginIsolatedContextType", {Isolated: "Isolated", NotIsolated: "NotIsolated", NotIsolatedFeatureDisabled: "NotIsolatedFeatureDisabled"});
|
|
1049
1048
|
inspectorBackend.registerEnum("Page.GatedAPIFeatures", {SharedArrayBuffers: "SharedArrayBuffers", SharedArrayBuffersTransferAllowed: "SharedArrayBuffersTransferAllowed", PerformanceMeasureMemory: "PerformanceMeasureMemory", PerformanceProfile: "PerformanceProfile"});
|
|
1050
|
-
inspectorBackend.registerEnum("Page.PermissionsPolicyFeature", {Accelerometer: "accelerometer", AllScreensCapture: "all-screens-capture", AmbientLightSensor: "ambient-light-sensor", AriaNotify: "aria-notify",
|
|
1049
|
+
inspectorBackend.registerEnum("Page.PermissionsPolicyFeature", {Accelerometer: "accelerometer", AllScreensCapture: "all-screens-capture", AmbientLightSensor: "ambient-light-sensor", AriaNotify: "aria-notify", Autofill: "autofill", Autoplay: "autoplay", Bluetooth: "bluetooth", BrowsingTopics: "browsing-topics", Camera: "camera", CapturedSurfaceControl: "captured-surface-control", ChDpr: "ch-dpr", ChDeviceMemory: "ch-device-memory", ChDownlink: "ch-downlink", ChEct: "ch-ect", ChPrefersColorScheme: "ch-prefers-color-scheme", ChPrefersReducedMotion: "ch-prefers-reduced-motion", ChPrefersReducedTransparency: "ch-prefers-reduced-transparency", ChRtt: "ch-rtt", ChSaveData: "ch-save-data", ChUa: "ch-ua", ChUaArch: "ch-ua-arch", ChUaBitness: "ch-ua-bitness", ChUaHighEntropyValues: "ch-ua-high-entropy-values", ChUaPlatform: "ch-ua-platform", ChUaModel: "ch-ua-model", ChUaMobile: "ch-ua-mobile", ChUaFormFactors: "ch-ua-form-factors", ChUaFullVersion: "ch-ua-full-version", ChUaFullVersionList: "ch-ua-full-version-list", ChUaPlatformVersion: "ch-ua-platform-version", ChUaWow64: "ch-ua-wow64", ChViewportHeight: "ch-viewport-height", ChViewportWidth: "ch-viewport-width", ChWidth: "ch-width", ClipboardRead: "clipboard-read", ClipboardWrite: "clipboard-write", ComputePressure: "compute-pressure", ControlledFrame: "controlled-frame", CrossOriginIsolated: "cross-origin-isolated", DeferredFetch: "deferred-fetch", DeferredFetchMinimal: "deferred-fetch-minimal", DeviceAttributes: "device-attributes", DigitalCredentialsCreate: "digital-credentials-create", DigitalCredentialsGet: "digital-credentials-get", DirectSockets: "direct-sockets", DirectSocketsMulticast: "direct-sockets-multicast", DisplayCapture: "display-capture", DocumentDomain: "document-domain", EncryptedMedia: "encrypted-media", ExecutionWhileOutOfViewport: "execution-while-out-of-viewport", ExecutionWhileNotRendered: "execution-while-not-rendered", FocusWithoutUserActivation: "focus-without-user-activation", Fullscreen: "fullscreen", Frobulate: "frobulate", Gamepad: "gamepad", Geolocation: "geolocation", Gyroscope: "gyroscope", Hid: "hid", IdentityCredentialsGet: "identity-credentials-get", IdleDetection: "idle-detection", InterestCohort: "interest-cohort", JoinAdInterestGroup: "join-ad-interest-group", KeyboardMap: "keyboard-map", LanguageDetector: "language-detector", LanguageModel: "language-model", LocalFonts: "local-fonts", LocalNetwork: "local-network", LocalNetworkAccess: "local-network-access", LoopbackNetwork: "loopback-network", Magnetometer: "magnetometer", ManualText: "manual-text", MediaPlaybackWhileNotVisible: "media-playback-while-not-visible", Microphone: "microphone", Midi: "midi", OnDeviceSpeechRecognition: "on-device-speech-recognition", OtpCredentials: "otp-credentials", Payment: "payment", PictureInPicture: "picture-in-picture", PrivateAggregation: "private-aggregation", PrivateStateTokenIssuance: "private-state-token-issuance", PrivateStateTokenRedemption: "private-state-token-redemption", PublickeyCredentialsCreate: "publickey-credentials-create", PublickeyCredentialsGet: "publickey-credentials-get", RecordAdAuctionEvents: "record-ad-auction-events", Rewriter: "rewriter", RunAdAuction: "run-ad-auction", ScreenWakeLock: "screen-wake-lock", Serial: "serial", SharedStorage: "shared-storage", SharedStorageSelectUrl: "shared-storage-select-url", SmartCard: "smart-card", SpeakerSelection: "speaker-selection", StorageAccess: "storage-access", SubApps: "sub-apps", Summarizer: "summarizer", SyncXhr: "sync-xhr", Tools: "tools", Translator: "translator", Unload: "unload", Usb: "usb", UsbUnrestricted: "usb-unrestricted", VerticalScroll: "vertical-scroll", WebAppInstallation: "web-app-installation", Webnn: "webnn", WebPrinting: "web-printing", WebShare: "web-share", WindowManagement: "window-management", Writer: "writer", XrSpatialTracking: "xr-spatial-tracking"});
|
|
1051
1050
|
inspectorBackend.registerEnum("Page.PermissionsPolicyBlockReason", {Header: "Header", IframeAttribute: "IframeAttribute", InFencedFrameTree: "InFencedFrameTree", InIsolatedApp: "InIsolatedApp"});
|
|
1052
1051
|
inspectorBackend.registerEnum("Page.OriginTrialTokenStatus", {Success: "Success", NotSupported: "NotSupported", Insecure: "Insecure", Expired: "Expired", WrongOrigin: "WrongOrigin", InvalidSignature: "InvalidSignature", Malformed: "Malformed", WrongVersion: "WrongVersion", FeatureDisabled: "FeatureDisabled", TokenDisabled: "TokenDisabled", FeatureDisabledForUser: "FeatureDisabledForUser", UnknownTrial: "UnknownTrial"});
|
|
1053
1052
|
inspectorBackend.registerEnum("Page.OriginTrialStatus", {Enabled: "Enabled", ValidTokenNotProvided: "ValidTokenNotProvided", OSNotSupported: "OSNotSupported", TrialNotAllowed: "TrialNotAllowed"});
|
|
@@ -1120,30 +1120,6 @@ export namespace Audits {
|
|
|
1120
1120
|
clientSecurityState?: Network.ClientSecurityState;
|
|
1121
1121
|
}
|
|
1122
1122
|
|
|
1123
|
-
export const enum AttributionReportingIssueType {
|
|
1124
|
-
PermissionPolicyDisabled = 'PermissionPolicyDisabled',
|
|
1125
|
-
UntrustworthyReportingOrigin = 'UntrustworthyReportingOrigin',
|
|
1126
|
-
InsecureContext = 'InsecureContext',
|
|
1127
|
-
InvalidHeader = 'InvalidHeader',
|
|
1128
|
-
InvalidRegisterTriggerHeader = 'InvalidRegisterTriggerHeader',
|
|
1129
|
-
SourceAndTriggerHeaders = 'SourceAndTriggerHeaders',
|
|
1130
|
-
SourceIgnored = 'SourceIgnored',
|
|
1131
|
-
TriggerIgnored = 'TriggerIgnored',
|
|
1132
|
-
OsSourceIgnored = 'OsSourceIgnored',
|
|
1133
|
-
OsTriggerIgnored = 'OsTriggerIgnored',
|
|
1134
|
-
InvalidRegisterOsSourceHeader = 'InvalidRegisterOsSourceHeader',
|
|
1135
|
-
InvalidRegisterOsTriggerHeader = 'InvalidRegisterOsTriggerHeader',
|
|
1136
|
-
WebAndOsHeaders = 'WebAndOsHeaders',
|
|
1137
|
-
NoWebOrOsSupport = 'NoWebOrOsSupport',
|
|
1138
|
-
NavigationRegistrationWithoutTransientUserActivation = 'NavigationRegistrationWithoutTransientUserActivation',
|
|
1139
|
-
InvalidInfoHeader = 'InvalidInfoHeader',
|
|
1140
|
-
NoRegisterSourceHeader = 'NoRegisterSourceHeader',
|
|
1141
|
-
NoRegisterTriggerHeader = 'NoRegisterTriggerHeader',
|
|
1142
|
-
NoRegisterOsSourceHeader = 'NoRegisterOsSourceHeader',
|
|
1143
|
-
NoRegisterOsTriggerHeader = 'NoRegisterOsTriggerHeader',
|
|
1144
|
-
NavigationRegistrationUniqueScopeAlreadySet = 'NavigationRegistrationUniqueScopeAlreadySet',
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
1123
|
export const enum SharedDictionaryError {
|
|
1148
1124
|
UseErrorCrossOriginNoCorsRequest = 'UseErrorCrossOriginNoCorsRequest',
|
|
1149
1125
|
UseErrorDictionaryLoadFailure = 'UseErrorDictionaryLoadFailure',
|
|
@@ -1217,17 +1193,6 @@ export namespace Audits {
|
|
|
1217
1193
|
InvalidUrlPattern = 'InvalidUrlPattern',
|
|
1218
1194
|
}
|
|
1219
1195
|
|
|
1220
|
-
/**
|
|
1221
|
-
* Details for issues around "Attribution Reporting API" usage.
|
|
1222
|
-
* Explainer: https://github.com/WICG/attribution-reporting-api
|
|
1223
|
-
*/
|
|
1224
|
-
export interface AttributionReportingIssueDetails {
|
|
1225
|
-
violationType: AttributionReportingIssueType;
|
|
1226
|
-
request?: AffectedRequest;
|
|
1227
|
-
violatingNodeId?: DOM.BackendNodeId;
|
|
1228
|
-
invalidParameter?: string;
|
|
1229
|
-
}
|
|
1230
|
-
|
|
1231
1196
|
/**
|
|
1232
1197
|
* Details for issues about documents in Quirks Mode
|
|
1233
1198
|
* or Limited Quirks Mode that affects page layouting.
|
|
@@ -1707,6 +1672,24 @@ export namespace Audits {
|
|
|
1707
1672
|
stackTrace?: Runtime.StackTrace;
|
|
1708
1673
|
}
|
|
1709
1674
|
|
|
1675
|
+
/**
|
|
1676
|
+
* Details for issues about lazy-loaded images without explicit dimensions.
|
|
1677
|
+
*/
|
|
1678
|
+
export interface LazyLoadImageIssueDetails {
|
|
1679
|
+
/**
|
|
1680
|
+
* DOM node of the problematic HTMLImageElement.
|
|
1681
|
+
*/
|
|
1682
|
+
nodeId: DOM.BackendNodeId;
|
|
1683
|
+
/**
|
|
1684
|
+
* URL or src attribute of the image.
|
|
1685
|
+
*/
|
|
1686
|
+
url: string;
|
|
1687
|
+
/**
|
|
1688
|
+
* Frame containing the image.
|
|
1689
|
+
*/
|
|
1690
|
+
frameId: Page.FrameId;
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1710
1693
|
/**
|
|
1711
1694
|
* A unique identifier for the type of issue. Each type may use one of the
|
|
1712
1695
|
* optional fields in InspectorIssueDetails to convey more specific
|
|
@@ -1720,7 +1703,6 @@ export namespace Audits {
|
|
|
1720
1703
|
ContentSecurityPolicyIssue = 'ContentSecurityPolicyIssue',
|
|
1721
1704
|
SharedArrayBufferIssue = 'SharedArrayBufferIssue',
|
|
1722
1705
|
CorsIssue = 'CorsIssue',
|
|
1723
|
-
AttributionReportingIssue = 'AttributionReportingIssue',
|
|
1724
1706
|
QuirksModeIssue = 'QuirksModeIssue',
|
|
1725
1707
|
PartitioningBlobURLIssue = 'PartitioningBlobURLIssue',
|
|
1726
1708
|
NavigatorUserAgentIssue = 'NavigatorUserAgentIssue',
|
|
@@ -1743,6 +1725,7 @@ export namespace Audits {
|
|
|
1743
1725
|
PerformanceIssue = 'PerformanceIssue',
|
|
1744
1726
|
SelectivePermissionsInterventionIssue = 'SelectivePermissionsInterventionIssue',
|
|
1745
1727
|
EmailVerificationRequestIssue = 'EmailVerificationRequestIssue',
|
|
1728
|
+
LazyLoadImageIssue = 'LazyLoadImageIssue',
|
|
1746
1729
|
}
|
|
1747
1730
|
|
|
1748
1731
|
/**
|
|
@@ -1758,7 +1741,6 @@ export namespace Audits {
|
|
|
1758
1741
|
contentSecurityPolicyIssueDetails?: ContentSecurityPolicyIssueDetails;
|
|
1759
1742
|
sharedArrayBufferIssueDetails?: SharedArrayBufferIssueDetails;
|
|
1760
1743
|
corsIssueDetails?: CorsIssueDetails;
|
|
1761
|
-
attributionReportingIssueDetails?: AttributionReportingIssueDetails;
|
|
1762
1744
|
quirksModeIssueDetails?: QuirksModeIssueDetails;
|
|
1763
1745
|
partitioningBlobURLIssueDetails?: PartitioningBlobURLIssueDetails;
|
|
1764
1746
|
/**
|
|
@@ -1784,6 +1766,7 @@ export namespace Audits {
|
|
|
1784
1766
|
performanceIssueDetails?: PerformanceIssueDetails;
|
|
1785
1767
|
selectivePermissionsInterventionIssueDetails?: SelectivePermissionsInterventionIssueDetails;
|
|
1786
1768
|
emailVerificationRequestIssueDetails?: EmailVerificationRequestIssueDetails;
|
|
1769
|
+
lazyLoadImageIssueDetails?: LazyLoadImageIssueDetails;
|
|
1787
1770
|
}
|
|
1788
1771
|
|
|
1789
1772
|
/**
|
|
@@ -14719,7 +14702,6 @@ export namespace Page {
|
|
|
14719
14702
|
AllScreensCapture = 'all-screens-capture',
|
|
14720
14703
|
AmbientLightSensor = 'ambient-light-sensor',
|
|
14721
14704
|
AriaNotify = 'aria-notify',
|
|
14722
|
-
AttributionReporting = 'attribution-reporting',
|
|
14723
14705
|
Autofill = 'autofill',
|
|
14724
14706
|
Autoplay = 'autoplay',
|
|
14725
14707
|
Bluetooth = 'bluetooth',
|
|
@@ -55,9 +55,9 @@ export class CompilerScriptMapping implements DebuggerSourceMapping {
|
|
|
55
55
|
this.#debuggerModel = debuggerModel;
|
|
56
56
|
this.#ignoreListManager = debuggerWorkspaceBinding.ignoreListManager;
|
|
57
57
|
|
|
58
|
-
this.#stubProject =
|
|
59
|
-
workspace, 'jsSourceMaps:stub:' + debuggerModel.target().id(),
|
|
60
|
-
|
|
58
|
+
this.#stubProject =
|
|
59
|
+
new ContentProviderBasedProject(workspace, 'jsSourceMaps:stub:' + debuggerModel.target().id(),
|
|
60
|
+
Workspace.Workspace.projectTypes.Service, '', true /* isServiceProject */);
|
|
61
61
|
this.#eventListeners = [
|
|
62
62
|
this.#sourceMapManager.addEventListener(
|
|
63
63
|
SDK.SourceMapManager.Events.SourceMapWillAttach, this.sourceMapWillAttach, this),
|
|
@@ -463,8 +463,8 @@ export class CompilerScriptMapping implements DebuggerSourceMapping {
|
|
|
463
463
|
if (!project) {
|
|
464
464
|
const projectType = script.isContentScript() ? Workspace.Workspace.projectTypes.ContentScripts :
|
|
465
465
|
Workspace.Workspace.projectTypes.Network;
|
|
466
|
-
project = new ContentProviderBasedProject(
|
|
467
|
-
|
|
466
|
+
project = new ContentProviderBasedProject(this.#stubProject.workspace(), projectId, projectType,
|
|
467
|
+
/* displayName */ '', /* isServiceProject */ false);
|
|
468
468
|
NetworkProject.setTargetForProject(project, target);
|
|
469
469
|
this.#projects.set(projectId, project);
|
|
470
470
|
}
|
|
@@ -26,9 +26,8 @@ interface UISourceCodeData {
|
|
|
26
26
|
export class ContentProviderBasedProject extends Workspace.Workspace.ProjectStore {
|
|
27
27
|
readonly #isServiceProject: boolean;
|
|
28
28
|
readonly #uiSourceCodeToData = new WeakMap<Workspace.UISourceCode.UISourceCode, UISourceCodeData>();
|
|
29
|
-
constructor(
|
|
30
|
-
|
|
31
|
-
displayName: string, isServiceProject: boolean) {
|
|
29
|
+
constructor(workspace: Workspace.Workspace.WorkspaceImpl, id: string, type: Workspace.Workspace.projectTypes,
|
|
30
|
+
displayName: string, isServiceProject: boolean) {
|
|
32
31
|
super(workspace, id, type, displayName);
|
|
33
32
|
this.#isServiceProject = isServiceProject;
|
|
34
33
|
workspace.addProject(this);
|
|
@@ -1100,9 +1100,9 @@ class ModelData {
|
|
|
1100
1100
|
project: ContentProviderBasedProject;
|
|
1101
1101
|
readonly uiSourceCodeToScripts: Map<Workspace.UISourceCode.UISourceCode, SDK.Script.Script[]>;
|
|
1102
1102
|
constructor(debuggerModel: SDK.DebuggerModel.DebuggerModel, workspace: Workspace.Workspace.WorkspaceImpl) {
|
|
1103
|
-
this.project =
|
|
1104
|
-
workspace, 'language_plugins::' + debuggerModel.target().id(),
|
|
1105
|
-
|
|
1103
|
+
this.project =
|
|
1104
|
+
new ContentProviderBasedProject(workspace, 'language_plugins::' + debuggerModel.target().id(),
|
|
1105
|
+
Workspace.Workspace.projectTypes.Network, '', false /* isServiceProject */);
|
|
1106
1106
|
NetworkProject.setTargetForProject(this.project, debuggerModel.target());
|
|
1107
1107
|
|
|
1108
1108
|
this.uiSourceCodeToScripts = new Map();
|
|
@@ -23,9 +23,9 @@ export class DefaultScriptMapping implements DebuggerSourceMapping {
|
|
|
23
23
|
debuggerWorkspaceBinding: DebuggerWorkspaceBinding) {
|
|
24
24
|
defaultScriptMappings.add(this);
|
|
25
25
|
this.#debuggerWorkspaceBinding = debuggerWorkspaceBinding;
|
|
26
|
-
this.#project =
|
|
27
|
-
workspace, 'debugger:' + debuggerModel.target().id(),
|
|
28
|
-
|
|
26
|
+
this.#project =
|
|
27
|
+
new ContentProviderBasedProject(workspace, 'debugger:' + debuggerModel.target().id(),
|
|
28
|
+
Workspace.Workspace.projectTypes.Debugger, '', true /* isServiceProject */);
|
|
29
29
|
this.#eventListeners = [
|
|
30
30
|
debuggerModel.addEventListener(SDK.DebuggerModel.Events.GlobalObjectCleared, this.globalObjectCleared, this),
|
|
31
31
|
debuggerModel.addEventListener(SDK.DebuggerModel.Events.ParsedScriptSource, this.parsedScriptSource, this),
|
|
@@ -361,9 +361,9 @@ class ModelInfo {
|
|
|
361
361
|
constructor(resourceMapping: ResourceMapping, resourceTreeModel: SDK.ResourceTreeModel.ResourceTreeModel) {
|
|
362
362
|
const target = resourceTreeModel.target();
|
|
363
363
|
this.resourceMapping = resourceMapping;
|
|
364
|
-
this.project =
|
|
365
|
-
resourceMapping.workspace, 'resources:' + target.id(),
|
|
366
|
-
|
|
364
|
+
this.project =
|
|
365
|
+
new ContentProviderBasedProject(resourceMapping.workspace, 'resources:' + target.id(),
|
|
366
|
+
Workspace.Workspace.projectTypes.Network, '', false /* isServiceProject */);
|
|
367
367
|
NetworkProject.setTargetForProject(this.project, target);
|
|
368
368
|
|
|
369
369
|
const cssModel = target.model(SDK.CSSModel.CSSModel);
|
|
@@ -73,8 +73,8 @@ export class ResourceScriptMapping implements DebuggerSourceMapping {
|
|
|
73
73
|
if (!project) {
|
|
74
74
|
const projectType = script.isContentScript() ? Workspace.Workspace.projectTypes.ContentScripts :
|
|
75
75
|
Workspace.Workspace.projectTypes.Network;
|
|
76
|
-
project = new ContentProviderBasedProject(
|
|
77
|
-
|
|
76
|
+
project = new ContentProviderBasedProject(this.#workspace, projectId, projectType, '' /* displayName */,
|
|
77
|
+
false /* isServiceProject */);
|
|
78
78
|
NetworkProject.setTargetForProject(project, this.debuggerModel.target());
|
|
79
79
|
this.#projects.set(projectId, project);
|
|
80
80
|
}
|
|
@@ -26,9 +26,9 @@ export class SASSSourceMapping implements SourceMapping {
|
|
|
26
26
|
workspace: Workspace.Workspace.WorkspaceImpl, cssWorkspaceBinding: CSSWorkspaceBinding) {
|
|
27
27
|
this.#sourceMapManager = sourceMapManager;
|
|
28
28
|
this.#cssWorkspaceBinding = cssWorkspaceBinding;
|
|
29
|
-
this.#project =
|
|
30
|
-
workspace, 'cssSourceMaps:' + target.id(),
|
|
31
|
-
|
|
29
|
+
this.#project =
|
|
30
|
+
new ContentProviderBasedProject(workspace, 'cssSourceMaps:' + target.id(),
|
|
31
|
+
Workspace.Workspace.projectTypes.Network, '', false /* isServiceProject */);
|
|
32
32
|
NetworkProject.setTargetForProject(this.#project, target);
|
|
33
33
|
|
|
34
34
|
this.#bindings = new Map();
|
|
@@ -2,12 +2,17 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
-
import * as Common from '../../core/common/common.js';
|
|
5
|
+
import type * as Common from '../../core/common/common.js';
|
|
6
6
|
|
|
7
7
|
import {ChunkedFileReader, type ChunkedReader} from './FileUtils.js';
|
|
8
8
|
|
|
9
9
|
export class TempFile {
|
|
10
10
|
#lastBlob: Blob|null = null;
|
|
11
|
+
readonly #console: Common.Console.Console;
|
|
12
|
+
|
|
13
|
+
constructor(console: Common.Console.Console) {
|
|
14
|
+
this.#console = console;
|
|
15
|
+
}
|
|
11
16
|
|
|
12
17
|
write(pieces: Array<string|Blob>): void {
|
|
13
18
|
if (this.#lastBlob) {
|
|
@@ -26,7 +31,7 @@ export class TempFile {
|
|
|
26
31
|
|
|
27
32
|
async readRange(startOffset?: number, endOffset?: number): Promise<string|null> {
|
|
28
33
|
if (!this.#lastBlob) {
|
|
29
|
-
|
|
34
|
+
this.#console.error('Attempt to read a temp file that was never written');
|
|
30
35
|
return '';
|
|
31
36
|
}
|
|
32
37
|
const blob = typeof startOffset === 'number' || typeof endOffset === 'number' ?
|
|
@@ -41,7 +46,7 @@ export class TempFile {
|
|
|
41
46
|
reader.readAsText(blob);
|
|
42
47
|
});
|
|
43
48
|
} catch (error) {
|
|
44
|
-
|
|
49
|
+
this.#console.error('Failed to read from temp file: ' + error.message);
|
|
45
50
|
}
|
|
46
51
|
|
|
47
52
|
return reader.result as string | null;
|
|
@@ -459,9 +459,9 @@ namespace APIImpl {
|
|
|
459
459
|
}
|
|
460
460
|
|
|
461
461
|
export interface ExtensionSidebarPane extends ExtensionView, PublicAPI.Chrome.DevTools.ExtensionSidebarPane {
|
|
462
|
-
setExpression(
|
|
463
|
-
|
|
464
|
-
|
|
462
|
+
setExpression(expression: string, rootTitle?: string, evaluateOptions?: PrivateAPI.EvaluateOptions): Promise<void>;
|
|
463
|
+
setExpression(expression: string, rootTitle?: string, evaluateOptions?: PrivateAPI.EvaluateOptions,
|
|
464
|
+
callback?: () => unknown): void;
|
|
465
465
|
}
|
|
466
466
|
|
|
467
467
|
export interface PanelWithSidebar extends ExtensionView, PublicAPI.Chrome.DevTools.PanelWithSidebar {
|
|
@@ -685,14 +685,29 @@ self.injectedExtensionAPI = function(
|
|
|
685
685
|
|
|
686
686
|
(Panels.prototype as
|
|
687
687
|
Pick<APIImpl.Panels, 'create'|'setOpenResourceHandler'|'openResource'|'SearchAction'|'setThemeChangeHandler'>) = {
|
|
688
|
-
create: function(
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
688
|
+
create: function(this: APIImpl.Panels, title: string, _iconPath: string, pagePath: string,
|
|
689
|
+
_callback?: (panel: PublicAPI.Chrome.DevTools.ExtensionPanel) => unknown):
|
|
690
|
+
Promise<PublicAPI.Chrome.DevTools.ExtensionPanel>|
|
|
691
|
+
void {
|
|
692
|
+
const {callback: callbackArg, promise, resolve, reject} =
|
|
693
|
+
callbackOrPromise<PublicAPI.Chrome.DevTools.ExtensionPanel>(arguments);
|
|
694
|
+
|
|
695
|
+
const id = 'extension-panel-' + extensionServer.nextObjectId();
|
|
696
|
+
|
|
697
|
+
const callbackWrapper = (response: unknown): void => {
|
|
698
|
+
if (checkErrorAndReject(response, reject)) {
|
|
699
|
+
return;
|
|
700
|
+
}
|
|
701
|
+
const panel = new (Constructor(ExtensionPanel))(id);
|
|
702
|
+
resolve?.(panel);
|
|
703
|
+
callbackArg?.call(this, panel);
|
|
704
|
+
};
|
|
705
|
+
|
|
706
|
+
extensionServer.sendRequest({command: PrivateAPI.Commands.CreatePanel, id, title, page: pagePath},
|
|
707
|
+
callbackWrapper);
|
|
708
|
+
|
|
709
|
+
return promise;
|
|
710
|
+
} as PublicAPI.Chrome.DevTools.Panels['create'],
|
|
696
711
|
|
|
697
712
|
setOpenResourceHandler: function(
|
|
698
713
|
callback: (resource: PublicAPI.Chrome.DevTools.Resource, lineNumber: number, columnNumber: number) => unknown,
|
|
@@ -746,15 +761,29 @@ self.injectedExtensionAPI = function(
|
|
|
746
761
|
}
|
|
747
762
|
},
|
|
748
763
|
|
|
749
|
-
openResource: function(
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
764
|
+
openResource: function(this: APIImpl.Panels, url: Platform.DevToolsPath.UrlString, lineNumber: number,
|
|
765
|
+
columnNumber?: number|(() => unknown), _callback?: () => unknown): Promise<void>|
|
|
766
|
+
void {
|
|
767
|
+
const {callback: callbackArg, promise, resolve, reject} = callbackOrPromise<unknown>(arguments);
|
|
768
|
+
// Handle older API:
|
|
769
|
+
const columnNumberArg = typeof columnNumber === 'number' ? columnNumber : 0;
|
|
770
|
+
|
|
771
|
+
const callbackWrapper = (response: unknown): void => {
|
|
772
|
+
if (checkErrorAndReject(response, reject)) {
|
|
773
|
+
return;
|
|
774
|
+
}
|
|
775
|
+
// `openResource` isn't supposed to send the response from the backend, but some JavaScript callers
|
|
776
|
+
// might be relying on it so we send it for now.
|
|
777
|
+
resolve?.(response);
|
|
778
|
+
callbackArg?.call(this, response);
|
|
779
|
+
};
|
|
780
|
+
|
|
781
|
+
extensionServer.sendRequest(
|
|
782
|
+
{command: PrivateAPI.Commands.OpenResource, url, lineNumber, columnNumber: columnNumberArg},
|
|
783
|
+
callbackWrapper);
|
|
784
|
+
|
|
785
|
+
return promise as Promise<void>| undefined;
|
|
786
|
+
} as PublicAPI.Chrome.DevTools.Panels['openResource'],
|
|
758
787
|
|
|
759
788
|
get SearchAction(): Record<string, string> {
|
|
760
789
|
return {
|
|
@@ -795,17 +824,28 @@ self.injectedExtensionAPI = function(
|
|
|
795
824
|
|
|
796
825
|
(PanelWithSidebarImpl.prototype as Pick<APIImpl.PanelWithSidebar, 'createSidebarPane'>&
|
|
797
826
|
{__proto__: APIImpl.ExtensionView}) = {
|
|
798
|
-
createSidebarPane: function(
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
827
|
+
createSidebarPane: function(this: APIImpl.PanelWithSidebar, title: string,
|
|
828
|
+
_callback?: (pane: PublicAPI.Chrome.DevTools.ExtensionSidebarPane) => unknown):
|
|
829
|
+
Promise<PublicAPI.Chrome.DevTools.ExtensionSidebarPane>|
|
|
830
|
+
void {
|
|
831
|
+
const {callback: callbackArg, promise, resolve, reject} =
|
|
832
|
+
callbackOrPromise<PublicAPI.Chrome.DevTools.ExtensionSidebarPane>(arguments);
|
|
833
|
+
const id = 'extension-sidebar-' + extensionServer.nextObjectId();
|
|
834
|
+
|
|
835
|
+
const callbackWrapper = (response: unknown): void => {
|
|
836
|
+
if (checkErrorAndReject(response, reject)) {
|
|
837
|
+
return;
|
|
838
|
+
}
|
|
839
|
+
const pane = new (Constructor(ExtensionSidebarPane))(id);
|
|
840
|
+
resolve?.(pane);
|
|
841
|
+
callbackArg?.call(this, pane);
|
|
842
|
+
};
|
|
843
|
+
|
|
844
|
+
extensionServer.sendRequest(
|
|
845
|
+
{command: PrivateAPI.Commands.CreateSidebarPane, panel: this._hostPanelName, id, title}, callbackWrapper);
|
|
846
|
+
|
|
847
|
+
return promise;
|
|
848
|
+
} as PublicAPI.Chrome.DevTools.PanelWithSidebar['createSidebarPane'],
|
|
809
849
|
|
|
810
850
|
__proto__: ExtensionViewImpl.prototype,
|
|
811
851
|
};
|
|
@@ -1125,8 +1165,9 @@ self.injectedExtensionAPI = function(
|
|
|
1125
1165
|
* otherwise.
|
|
1126
1166
|
*/
|
|
1127
1167
|
function checkErrorAndReject(response: unknown, reject?: (error: Error) => void): boolean {
|
|
1128
|
-
const res = response as {isError?: boolean, description?: string, details?: unknown[]};
|
|
1129
|
-
|
|
1168
|
+
const res = response as {isError?: boolean, description?: string, details?: unknown[]} | undefined;
|
|
1169
|
+
// Sometimes the success response from the backend is `undefined`.
|
|
1170
|
+
if (res?.isError && reject) {
|
|
1130
1171
|
reject(new Error('DevTools API encountered an error'));
|
|
1131
1172
|
return true;
|
|
1132
1173
|
}
|
|
@@ -1220,11 +1261,20 @@ self.injectedExtensionAPI = function(
|
|
|
1220
1261
|
extensionServer.sendRequest({command: PrivateAPI.Commands.SetSidebarHeight, id: this._id as string, height});
|
|
1221
1262
|
},
|
|
1222
1263
|
|
|
1223
|
-
setExpression: function(
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1264
|
+
setExpression: function(this: APIImpl.ExtensionSidebarPane, expression: string, rootTitle?: string,
|
|
1265
|
+
evaluateOptions?: PrivateAPI.EvaluateOptions, _callback?: () => unknown): Promise<void>|
|
|
1266
|
+
void {
|
|
1267
|
+
const {callback: callbackArg, promise, resolve, reject} = callbackOrPromise<void>(arguments);
|
|
1268
|
+
|
|
1269
|
+
const callbackWrapper = (response: unknown): void => {
|
|
1270
|
+
if (checkErrorAndReject(response, reject)) {
|
|
1271
|
+
return;
|
|
1272
|
+
}
|
|
1273
|
+
resolve?.();
|
|
1274
|
+
callbackArg?.call(this);
|
|
1275
|
+
};
|
|
1276
|
+
|
|
1277
|
+
extensionServer.sendRequest({
|
|
1228
1278
|
command: PrivateAPI.Commands.SetSidebarContent,
|
|
1229
1279
|
id: this._id as string,
|
|
1230
1280
|
expression,
|
|
@@ -1232,20 +1282,34 @@ self.injectedExtensionAPI = function(
|
|
|
1232
1282
|
evaluateOnPage: true,
|
|
1233
1283
|
evaluateOptions: (typeof evaluateOptions === 'object' ? evaluateOptions : {}),
|
|
1234
1284
|
},
|
|
1235
|
-
|
|
1236
|
-
},
|
|
1285
|
+
callbackWrapper);
|
|
1237
1286
|
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1287
|
+
return promise;
|
|
1288
|
+
} as PublicAPI.Chrome.DevTools.ExtensionSidebarPane['setExpression'],
|
|
1289
|
+
|
|
1290
|
+
setObject: function(this: APIImpl.ExtensionSidebarPane, jsonObject: string, rootTitle?: string,
|
|
1291
|
+
_callback?: () => unknown): Promise<void>|
|
|
1292
|
+
void {
|
|
1293
|
+
const {callback: callbackArg, promise, resolve, reject} = callbackOrPromise<void>(arguments);
|
|
1294
|
+
|
|
1295
|
+
const callbackWrapper = (response: unknown): void => {
|
|
1296
|
+
if (checkErrorAndReject(response, reject)) {
|
|
1297
|
+
return;
|
|
1298
|
+
}
|
|
1299
|
+
resolve?.();
|
|
1300
|
+
callbackArg?.call(this);
|
|
1301
|
+
};
|
|
1302
|
+
|
|
1303
|
+
extensionServer.sendRequest({
|
|
1242
1304
|
command: PrivateAPI.Commands.SetSidebarContent,
|
|
1243
1305
|
id: this._id as string,
|
|
1244
1306
|
expression: jsonObject,
|
|
1245
1307
|
rootTitle,
|
|
1246
1308
|
},
|
|
1247
|
-
|
|
1248
|
-
|
|
1309
|
+
callbackWrapper);
|
|
1310
|
+
|
|
1311
|
+
return promise;
|
|
1312
|
+
} as PublicAPI.Chrome.DevTools.ExtensionSidebarPane['setObject'],
|
|
1249
1313
|
|
|
1250
1314
|
setPage: function(this: APIImpl.ExtensionSidebarPane, page: string): void {
|
|
1251
1315
|
extensionServer.sendRequest({command: PrivateAPI.Commands.SetSidebarPage, id: this._id as string, page});
|