chrome-devtools-frontend 1.0.1738725 → 1.0.1739869
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/.stylelintrc.json +3 -1
- package/eslint.config.mjs +127 -0
- package/front_end/application_tokens.css +0 -30
- package/front_end/core/sdk/SourceMap.ts +30 -3
- package/front_end/core/sdk/SourceMapRangeMappings.ts +57 -0
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +5 -9
- package/front_end/generated/SupportedCSSProperties.ts +16 -0
- package/front_end/models/trace/extras/TraceFilter.ts +16 -8
- package/front_end/models/trace/extras/TraceTree.ts +104 -67
- package/front_end/models/trace/handlers/ExtensionTraceDataHandler.ts +0 -5
- package/front_end/models/trace/handlers/RendererHandler.ts +7 -6
- package/front_end/models/trace/handlers/SamplesHandler.ts +1 -1
- package/front_end/models/trace/helpers/Extensions.ts +1 -3
- package/front_end/models/trace/helpers/SamplesIntegrator.ts +155 -87
- package/front_end/models/trace/helpers/Trace.ts +15 -12
- package/front_end/models/trace/helpers/TreeHelpers.ts +38 -10
- package/front_end/models/trace/insights/SlowCSSSelector.ts +3 -3
- package/front_end/models/trace/lantern/metrics/LargestContentfulPaint.ts +19 -4
- package/front_end/panels/ai_assistance/components/chatView.css +0 -180
- package/front_end/panels/application/ApplicationPanelTreeElement.ts +66 -3
- package/front_end/panels/application/components/backForwardCacheView.css +1 -1
- package/front_end/panels/application/resourcesPanel.css +0 -48
- package/front_end/panels/console/consoleView.css +1 -1
- package/front_end/panels/elements/StylePropertiesSection.ts +4 -9
- package/front_end/panels/elements/StylePropertyTreeElement.ts +52 -34
- package/front_end/panels/elements/classesPaneWidget.css +3 -7
- package/front_end/panels/elements/components/CSSQuery.ts +6 -5
- package/front_end/panels/elements/metricsSidebarPane.css +2 -2
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +0 -6
- package/front_end/panels/elements/stylesSidebarPane.css +0 -1
- package/front_end/panels/explain/components/consoleInsight.css +1 -6
- package/front_end/panels/issues/AffectedBlockedByResponseView.ts +88 -46
- package/front_end/panels/issues/AffectedHeavyAdView.ts +72 -43
- package/front_end/panels/issues/AffectedResourcesView.ts +81 -13
- package/front_end/panels/issues/GenericIssueDetailsView.ts +112 -32
- package/front_end/panels/issues/issues.ts +2 -0
- package/front_end/panels/issues/issuesTree.css +7 -0
- package/front_end/panels/layer_viewer/layerDetailsView.css +1 -1
- package/front_end/panels/lighthouse/lighthousePanel.css +0 -9
- package/front_end/panels/linear_memory_inspector/components/linearMemoryValueInterpreter.css +2 -2
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +2 -2
- package/front_end/panels/network/NetworkLogView.ts +9 -2
- package/front_end/panels/network/RequestTimingView.ts +16 -2
- package/front_end/panels/network/networkConfigView.css +2 -2
- package/front_end/panels/network/networkLogView.css +2 -15
- package/front_end/panels/network/networkPanel.css +0 -2
- package/front_end/panels/network/networkTimingTable.css +11 -26
- package/front_end/panels/profiler/profilesPanel.css +0 -11
- package/front_end/panels/recorder/ControlButton.ts +1 -1
- package/front_end/panels/recorder/RecordingView.ts +22 -1
- package/front_end/panels/recorder/StepView.ts +26 -1
- package/front_end/panels/recorder/TimelineSection.ts +22 -6
- package/front_end/panels/recorder/controlButton.css +2 -9
- package/front_end/panels/recorder/recorderPanel.css +0 -1
- package/front_end/panels/recorder/recordingView.css +32 -32
- package/front_end/panels/recorder/replaySection.css +2 -0
- package/front_end/panels/recorder/stepView.css +18 -14
- package/front_end/panels/recorder/timelineSection.css +60 -84
- package/front_end/panels/search/searchView.css +1 -1
- package/front_end/panels/sensors/SensorsView.ts +6 -21
- package/front_end/panels/sources/breakpointsView.css +3 -2
- package/front_end/panels/sources/sourcesView.css +2 -1
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +18 -5
- package/front_end/panels/timeline/TimelineController.ts +30 -26
- package/front_end/panels/timeline/TimelineDetailsView.ts +10 -9
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +4 -16
- package/front_end/panels/timeline/TimelineMiniMap.ts +132 -54
- package/front_end/panels/timeline/TimelineTreeView.ts +25 -9
- package/front_end/panels/timeline/components/DetailsView.ts +7 -14
- package/front_end/panels/timeline/components/NetworkTrackWidget.ts +5 -1
- package/front_end/panels/timeline/components/interactionBreakdown.css +1 -0
- package/front_end/panels/timeline/components/networkRequestDetails.css +1 -0
- package/front_end/panels/timeline/components/networkTrackWidget.css +1 -1
- package/front_end/panels/timeline/components/sidebarInsightsTab.css +1 -0
- package/front_end/panels/timeline/docs/profile_calls.md +7 -9
- package/front_end/panels/timeline/timelineDetailsView.css +2 -2
- package/front_end/panels/webauthn/webauthnPane.css +1 -1
- package/front_end/third_party/axe-core/README.chromium +2 -3
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +328 -11
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +907 -588
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts +119 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.d.ts +120 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.d.ts +16 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts +26 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts +23 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js +21 -14
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.d.ts +5 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.js +4 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.d.ts +6 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.js +158 -67
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserConnector.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Frame.js +28 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.js +19 -11
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js +17 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Input.js +62 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Input.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/NetworkEvents.d.ts +29 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/NetworkEvents.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/NetworkEvents.js +60 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/NetworkEvents.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts +9 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js +24 -9
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.js +16 -7
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Browser.d.ts +6 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Browser.js +37 -20
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.js +10 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Navigation.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Navigation.js +18 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Navigation.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Request.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Request.js +24 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Request.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Binding.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Binding.js +6 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Binding.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ExtensionTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ExtensionTransport.js +30 -6
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ExtensionTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.js +12 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.d.ts +3 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.js +40 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.d.ts +23 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.js +37 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js +74 -16
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js +34 -23
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ResponseBodyStream.d.ts +10 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ResponseBodyStream.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ResponseBodyStream.js +94 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ResponseBodyStream.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.js +29 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/utils.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/utils.js +6 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/utils.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConsoleMessage.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConsoleMessage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.d.ts +4 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js +34 -15
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts +3 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js +11 -7
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.js +10 -7
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/decorators.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +328 -11
- package/front_end/third_party/puppeteer/package/package.json +10 -8
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +118 -0
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +119 -0
- package/front_end/third_party/puppeteer/package/src/api/HTTPRequest.ts +25 -2
- package/front_end/third_party/puppeteer/package/src/api/HTTPResponse.ts +28 -0
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +65 -38
- package/front_end/third_party/puppeteer/package/src/api/locators/locators.ts +27 -7
- package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +43 -7
- package/front_end/third_party/puppeteer/package/src/bidi/BrowserConnector.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Connection.ts +5 -1
- package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +38 -8
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +27 -12
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPResponse.ts +19 -6
- package/front_end/third_party/puppeteer/package/src/bidi/Input.ts +72 -5
- package/front_end/third_party/puppeteer/package/src/bidi/NetworkEvents.ts +82 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +37 -13
- package/front_end/third_party/puppeteer/package/src/bidi/Realm.ts +26 -14
- package/front_end/third_party/puppeteer/package/src/bidi/core/Browser.ts +43 -22
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +13 -5
- package/front_end/third_party/puppeteer/package/src/bidi/core/Navigation.ts +21 -1
- package/front_end/third_party/puppeteer/package/src/bidi/core/Request.ts +27 -5
- package/front_end/third_party/puppeteer/package/src/cdp/Binding.ts +6 -4
- package/front_end/third_party/puppeteer/package/src/cdp/ExtensionTransport.ts +31 -6
- package/front_end/third_party/puppeteer/package/src/cdp/FrameManager.ts +5 -0
- package/front_end/third_party/puppeteer/package/src/cdp/HTTPRequest.ts +18 -1
- package/front_end/third_party/puppeteer/package/src/cdp/HTTPResponse.ts +48 -0
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkEventManager.ts +58 -5
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkManager.ts +94 -14
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +50 -28
- package/front_end/third_party/puppeteer/package/src/cdp/ResponseBodyStream.ts +106 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Target.ts +38 -3
- package/front_end/third_party/puppeteer/package/src/cdp/cdp.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/utils.ts +6 -5
- package/front_end/third_party/puppeteer/package/src/common/ConsoleMessage.ts +5 -0
- package/front_end/third_party/puppeteer/package/src/common/EventEmitter.ts +17 -8
- package/front_end/third_party/puppeteer/package/src/common/util.ts +32 -15
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +21 -13
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +10 -10
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/decorators.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +2 -0
- package/front_end/ui/components/diff_view/diffView.css +0 -2
- package/front_end/ui/components/tooltips/Tooltip.ts +29 -0
- package/front_end/ui/components/tree_outline/treeOutline.css +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +34 -20
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +41 -14
- package/front_end/ui/legacy/components/source_frame/imageView.css +2 -2
- package/front_end/ui/legacy/filter.css +6 -2
- package/front_end/ui/legacy/inspectorCommon.css +1 -53
- package/front_end/ui/legacy/listWidget.css +1 -1
- package/front_end/ui/legacy/tabbedPane.css +0 -8
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/inspector_overlay/tool_highlight.css +0 -7
- package/inspector_overlay/tool_highlight.ts +0 -1
- package/package.json +1 -1
|
@@ -890,6 +890,116 @@ export declare const enum BrowserContextEvent {
|
|
|
890
890
|
* when a page is closed. Contains a {@link Target} instance.
|
|
891
891
|
*/
|
|
892
892
|
TargetDestroyed = 'targetdestroyed',
|
|
893
|
+
/**
|
|
894
|
+
* Emitted when JavaScript within any page or worker in the browser context
|
|
895
|
+
* calls one of the console API methods, e.g. `console.log` or
|
|
896
|
+
* `console.dir`. Contains a {@link ConsoleMessage} instance.
|
|
897
|
+
*
|
|
898
|
+
* @remarks
|
|
899
|
+
* Use {@link ConsoleMessage.page}, {@link ConsoleMessage.frame} or
|
|
900
|
+
* {@link ConsoleMessage.worker} to identify the originating context.
|
|
901
|
+
* Messages from workers have no page or frame: use
|
|
902
|
+
* {@link ConsoleMessage.worker} for them. Messages logged by the browser
|
|
903
|
+
* itself (e.g. network errors or violations) can have no page, frame or
|
|
904
|
+
* worker.
|
|
905
|
+
*
|
|
906
|
+
* Events are only delivered for pages and workers that Puppeteer has
|
|
907
|
+
* attached to, e.g. via {@link BrowserContext.pages} or
|
|
908
|
+
* {@link Target.page}. Registering the listener before attaching
|
|
909
|
+
* guarantees that console messages replayed by the browser on attachment
|
|
910
|
+
* are not lost.
|
|
911
|
+
*
|
|
912
|
+
* With WebDriver BiDi, console messages that the browser replays while
|
|
913
|
+
* connecting are delivered once, right after {@link Puppeteer.connect}
|
|
914
|
+
* resolves: register the listener before awaiting anything else, or they
|
|
915
|
+
* are missed. Replayed messages can be delivered after messages logged
|
|
916
|
+
* later.
|
|
917
|
+
*
|
|
918
|
+
* Service workers and shared workers are not attached automatically:
|
|
919
|
+
* their console messages are only delivered after {@link Target.worker}
|
|
920
|
+
* has been called for their target. With WebDriver BiDi, their console
|
|
921
|
+
* messages are not reported.
|
|
922
|
+
*
|
|
923
|
+
* The {@link ConsoleMessage.args | arguments} are shared with listeners
|
|
924
|
+
* registered on {@link Page}, {@link WebWorker} and {@link Browser}.
|
|
925
|
+
* Disposing them in one listener invalidates them for all other listeners.
|
|
926
|
+
*
|
|
927
|
+
* @experimental
|
|
928
|
+
*/
|
|
929
|
+
Console = 'console',
|
|
930
|
+
/**
|
|
931
|
+
* Emitted when any page in the browser context issues a request. Contains
|
|
932
|
+
* a {@link HTTPRequest} instance.
|
|
933
|
+
*
|
|
934
|
+
* @remarks
|
|
935
|
+
* Use {@link HTTPRequest.page} or {@link HTTPRequest.frame} to identify
|
|
936
|
+
* the originating context. Requests from dedicated workers have no page
|
|
937
|
+
* or frame: use {@link HTTPRequest.worker} for them. Dedicated worker
|
|
938
|
+
* requests and {@link HTTPRequest.worker} are not supported with
|
|
939
|
+
* WebDriver BiDi.
|
|
940
|
+
*
|
|
941
|
+
* With CDP, events are only delivered for pages that have a {@link Page}
|
|
942
|
+
* instance, e.g. created via {@link BrowserContext.pages} or {@link Target.page}.
|
|
943
|
+
* Requests issued before the instance exists, such as the initial
|
|
944
|
+
* navigation of a popup, are not reported. With WebDriver BiDi, requests
|
|
945
|
+
* from all pages are reported. Requests from service workers and shared
|
|
946
|
+
* workers are not reported.
|
|
947
|
+
*
|
|
948
|
+
* These listeners only observe requests. Do not call
|
|
949
|
+
* `request.continue()`, `abort()` or `respond()` from them: they are not
|
|
950
|
+
* coordinated with page-level handlers (see
|
|
951
|
+
* {@link https://pptr.dev/guides/network-interception#cooperative-intercept-mode | cooperative intercept mode}).
|
|
952
|
+
* To intercept requests, use {@link Page.setRequestInterception} with a
|
|
953
|
+
* {@link PageEvent.Request} listener.
|
|
954
|
+
*
|
|
955
|
+
* @experimental
|
|
956
|
+
*/
|
|
957
|
+
Request = 'request',
|
|
958
|
+
/**
|
|
959
|
+
* Emitted when a request issued by any page in the browser context is
|
|
960
|
+
* served from the memory cache. Contains a {@link HTTPRequest} instance.
|
|
961
|
+
*
|
|
962
|
+
* @remarks
|
|
963
|
+
* The same delivery rules as for {@link BrowserContextEvent.Request} apply.
|
|
964
|
+
*
|
|
965
|
+
* @experimental
|
|
966
|
+
*/
|
|
967
|
+
RequestServedFromCache = 'requestservedfromcache',
|
|
968
|
+
/**
|
|
969
|
+
* Emitted when a response is received for a request issued by any page in
|
|
970
|
+
* the browser context. Contains a {@link HTTPResponse} instance.
|
|
971
|
+
*
|
|
972
|
+
* @remarks
|
|
973
|
+
* Use {@link HTTPResponse.request} to access the originating request. The
|
|
974
|
+
* same delivery rules as for {@link BrowserContextEvent.Request} apply.
|
|
975
|
+
*
|
|
976
|
+
* @experimental
|
|
977
|
+
*/
|
|
978
|
+
Response = 'response',
|
|
979
|
+
/**
|
|
980
|
+
* Emitted when a request issued by any page in the browser context fails,
|
|
981
|
+
* for example by timing out. Contains a {@link HTTPRequest} instance.
|
|
982
|
+
*
|
|
983
|
+
* @remarks
|
|
984
|
+
* HTTP error responses, such as 404 or 503, are still successful responses
|
|
985
|
+
* from HTTP standpoint, so the request completes with
|
|
986
|
+
* {@link BrowserContextEvent.RequestFinished} and not with
|
|
987
|
+
* {@link BrowserContextEvent.RequestFailed}. The same delivery rules as
|
|
988
|
+
* for {@link BrowserContextEvent.Request} apply.
|
|
989
|
+
*
|
|
990
|
+
* @experimental
|
|
991
|
+
*/
|
|
992
|
+
RequestFailed = 'requestfailed',
|
|
993
|
+
/**
|
|
994
|
+
* Emitted when a request issued by any page in the browser context
|
|
995
|
+
* finishes successfully. Contains a {@link HTTPRequest} instance.
|
|
996
|
+
*
|
|
997
|
+
* @remarks
|
|
998
|
+
* The same delivery rules as for {@link BrowserContextEvent.Request} apply.
|
|
999
|
+
*
|
|
1000
|
+
* @experimental
|
|
1001
|
+
*/
|
|
1002
|
+
RequestFinished = 'requestfinished',
|
|
893
1003
|
}
|
|
894
1004
|
|
|
895
1005
|
/**
|
|
@@ -902,6 +1012,12 @@ export declare interface BrowserContextEvents extends Record<
|
|
|
902
1012
|
[BrowserContextEvent.TargetChanged]: Target;
|
|
903
1013
|
[BrowserContextEvent.TargetCreated]: Target;
|
|
904
1014
|
[BrowserContextEvent.TargetDestroyed]: Target;
|
|
1015
|
+
[BrowserContextEvent.Console]: ConsoleMessage;
|
|
1016
|
+
[BrowserContextEvent.Request]: HTTPRequest;
|
|
1017
|
+
[BrowserContextEvent.RequestServedFromCache]: HTTPRequest;
|
|
1018
|
+
[BrowserContextEvent.Response]: HTTPResponse;
|
|
1019
|
+
[BrowserContextEvent.RequestFailed]: HTTPRequest;
|
|
1020
|
+
[BrowserContextEvent.RequestFinished]: HTTPRequest;
|
|
905
1021
|
}
|
|
906
1022
|
|
|
907
1023
|
/**
|
|
@@ -967,6 +1083,115 @@ export declare const enum BrowserEvent {
|
|
|
967
1083
|
* contexts.
|
|
968
1084
|
*/
|
|
969
1085
|
TargetDestroyed = 'targetdestroyed',
|
|
1086
|
+
/**
|
|
1087
|
+
* Emitted when JavaScript within any page or worker in the browser calls
|
|
1088
|
+
* one of the console API methods, e.g. `console.log` or `console.dir`.
|
|
1089
|
+
* Contains a {@link ConsoleMessage} instance.
|
|
1090
|
+
*
|
|
1091
|
+
* @remarks
|
|
1092
|
+
* Use {@link ConsoleMessage.page}, {@link ConsoleMessage.frame} or
|
|
1093
|
+
* {@link ConsoleMessage.worker} to identify the originating context.
|
|
1094
|
+
* Messages from workers have no page or frame: use
|
|
1095
|
+
* {@link ConsoleMessage.worker} for them. Messages logged by the browser
|
|
1096
|
+
* itself (e.g. network errors or violations) can have no page, frame or
|
|
1097
|
+
* worker.
|
|
1098
|
+
*
|
|
1099
|
+
* Events are only delivered for pages and workers that Puppeteer has
|
|
1100
|
+
* attached to, e.g. via {@link Browser.pages} or {@link Target.page}.
|
|
1101
|
+
* Registering the listener before attaching guarantees that console
|
|
1102
|
+
* messages replayed by the browser on attachment are not lost.
|
|
1103
|
+
*
|
|
1104
|
+
* With WebDriver BiDi, console messages that the browser replays while
|
|
1105
|
+
* connecting are delivered once, right after {@link Puppeteer.connect}
|
|
1106
|
+
* resolves: register the listener before awaiting anything else, or they
|
|
1107
|
+
* are missed. Replayed messages can be delivered after messages logged
|
|
1108
|
+
* later.
|
|
1109
|
+
*
|
|
1110
|
+
* Service workers and shared workers are not attached automatically:
|
|
1111
|
+
* their console messages are only delivered after {@link Target.worker}
|
|
1112
|
+
* has been called for their target. With WebDriver BiDi, their console
|
|
1113
|
+
* messages are not reported.
|
|
1114
|
+
*
|
|
1115
|
+
* The {@link ConsoleMessage.args | arguments} are shared with listeners
|
|
1116
|
+
* registered on {@link Page}, {@link WebWorker} and {@link BrowserContext}.
|
|
1117
|
+
* Disposing them in one listener invalidates them for all other listeners.
|
|
1118
|
+
*
|
|
1119
|
+
* @experimental
|
|
1120
|
+
*/
|
|
1121
|
+
Console = 'console',
|
|
1122
|
+
/**
|
|
1123
|
+
* Emitted when any page in the browser issues a request. Contains a
|
|
1124
|
+
* {@link HTTPRequest} instance.
|
|
1125
|
+
*
|
|
1126
|
+
* @remarks
|
|
1127
|
+
* Use {@link HTTPRequest.page} or {@link HTTPRequest.frame} to identify
|
|
1128
|
+
* the originating context. Requests from dedicated workers have no page
|
|
1129
|
+
* or frame: use {@link HTTPRequest.worker} for them. Dedicated worker
|
|
1130
|
+
* requests and {@link HTTPRequest.worker} are not supported with
|
|
1131
|
+
* WebDriver BiDi.
|
|
1132
|
+
*
|
|
1133
|
+
* With CDP, events are only delivered for pages that have a {@link Page}
|
|
1134
|
+
* instance, e.g. created via {@link Browser.pages} or {@link Target.page}.
|
|
1135
|
+
* Requests issued before the instance exists, such as the initial
|
|
1136
|
+
* navigation of a popup, are not reported. With WebDriver BiDi, requests
|
|
1137
|
+
* from all pages are reported. Requests from service workers and shared
|
|
1138
|
+
* workers are not reported.
|
|
1139
|
+
*
|
|
1140
|
+
* These listeners only observe requests. Do not call
|
|
1141
|
+
* `request.continue()`, `abort()` or `respond()` from them: they are not
|
|
1142
|
+
* coordinated with page-level handlers (see
|
|
1143
|
+
* {@link https://pptr.dev/guides/network-interception#cooperative-intercept-mode | cooperative intercept mode}).
|
|
1144
|
+
* To intercept requests, use {@link Page.setRequestInterception} with a
|
|
1145
|
+
* {@link PageEvent.Request} listener.
|
|
1146
|
+
*
|
|
1147
|
+
* @experimental
|
|
1148
|
+
*/
|
|
1149
|
+
Request = 'request',
|
|
1150
|
+
/**
|
|
1151
|
+
* Emitted when a request issued by any page in the browser is served from
|
|
1152
|
+
* the memory cache. Contains a {@link HTTPRequest} instance.
|
|
1153
|
+
*
|
|
1154
|
+
* @remarks
|
|
1155
|
+
* The same delivery rules as for {@link BrowserEvent.Request} apply.
|
|
1156
|
+
*
|
|
1157
|
+
* @experimental
|
|
1158
|
+
*/
|
|
1159
|
+
RequestServedFromCache = 'requestservedfromcache',
|
|
1160
|
+
/**
|
|
1161
|
+
* Emitted when a response is received for a request issued by any page in
|
|
1162
|
+
* the browser. Contains a {@link HTTPResponse} instance.
|
|
1163
|
+
*
|
|
1164
|
+
* @remarks
|
|
1165
|
+
* Use {@link HTTPResponse.request} to access the originating request. The
|
|
1166
|
+
* same delivery rules as for {@link BrowserEvent.Request} apply.
|
|
1167
|
+
*
|
|
1168
|
+
* @experimental
|
|
1169
|
+
*/
|
|
1170
|
+
Response = 'response',
|
|
1171
|
+
/**
|
|
1172
|
+
* Emitted when a request issued by any page in the browser fails, for
|
|
1173
|
+
* example by timing out. Contains a {@link HTTPRequest} instance.
|
|
1174
|
+
*
|
|
1175
|
+
* @remarks
|
|
1176
|
+
* HTTP error responses, such as 404 or 503, are still successful responses
|
|
1177
|
+
* from HTTP standpoint, so the request completes with
|
|
1178
|
+
* {@link BrowserEvent.RequestFinished} and not with
|
|
1179
|
+
* {@link BrowserEvent.RequestFailed}. The same delivery rules as for
|
|
1180
|
+
* {@link BrowserEvent.Request} apply.
|
|
1181
|
+
*
|
|
1182
|
+
* @experimental
|
|
1183
|
+
*/
|
|
1184
|
+
RequestFailed = 'requestfailed',
|
|
1185
|
+
/**
|
|
1186
|
+
* Emitted when a request issued by any page in the browser finishes
|
|
1187
|
+
* successfully. Contains a {@link HTTPRequest} instance.
|
|
1188
|
+
*
|
|
1189
|
+
* @remarks
|
|
1190
|
+
* The same delivery rules as for {@link BrowserEvent.Request} apply.
|
|
1191
|
+
*
|
|
1192
|
+
* @experimental
|
|
1193
|
+
*/
|
|
1194
|
+
RequestFinished = 'requestfinished',
|
|
970
1195
|
}
|
|
971
1196
|
|
|
972
1197
|
/**
|
|
@@ -977,6 +1202,12 @@ export declare interface BrowserEvents extends Record<EventType, unknown> {
|
|
|
977
1202
|
[BrowserEvent.TargetCreated]: Target;
|
|
978
1203
|
[BrowserEvent.TargetDestroyed]: Target;
|
|
979
1204
|
[BrowserEvent.TargetChanged]: Target;
|
|
1205
|
+
[BrowserEvent.Console]: ConsoleMessage;
|
|
1206
|
+
[BrowserEvent.Request]: HTTPRequest;
|
|
1207
|
+
[BrowserEvent.RequestServedFromCache]: HTTPRequest;
|
|
1208
|
+
[BrowserEvent.Response]: HTTPResponse;
|
|
1209
|
+
[BrowserEvent.RequestFailed]: HTTPRequest;
|
|
1210
|
+
[BrowserEvent.RequestFinished]: HTTPRequest;
|
|
980
1211
|
}
|
|
981
1212
|
|
|
982
1213
|
/**
|
|
@@ -1617,6 +1848,10 @@ export declare interface ConsoleMessageLocation {
|
|
|
1617
1848
|
* 0-based column number in the resource if known or `undefined` otherwise.
|
|
1618
1849
|
*/
|
|
1619
1850
|
columnNumber?: number;
|
|
1851
|
+
/**
|
|
1852
|
+
* Script identifier if known or `undefined` otherwise.
|
|
1853
|
+
*/
|
|
1854
|
+
scriptId?: string;
|
|
1620
1855
|
}
|
|
1621
1856
|
|
|
1622
1857
|
/**
|
|
@@ -2912,7 +3147,10 @@ export declare class EventEmitter<
|
|
|
2912
3147
|
*/
|
|
2913
3148
|
on<Key extends keyof EventsWithWildcard<Events>>(
|
|
2914
3149
|
type: Key,
|
|
2915
|
-
handler:
|
|
3150
|
+
handler: (
|
|
3151
|
+
event: EventsWithWildcard<Events>[Key],
|
|
3152
|
+
eventData: Key extends '*' ? Events[keyof Events] : never,
|
|
3153
|
+
) => void,
|
|
2916
3154
|
): this;
|
|
2917
3155
|
/**
|
|
2918
3156
|
* Remove an event listener from firing.
|
|
@@ -2922,7 +3160,10 @@ export declare class EventEmitter<
|
|
|
2922
3160
|
*/
|
|
2923
3161
|
off<Key extends keyof EventsWithWildcard<Events>>(
|
|
2924
3162
|
type: Key,
|
|
2925
|
-
handler?:
|
|
3163
|
+
handler?: (
|
|
3164
|
+
event: EventsWithWildcard<Events>[Key],
|
|
3165
|
+
eventData: Key extends '*' ? Events[keyof Events] : never,
|
|
3166
|
+
) => void,
|
|
2926
3167
|
): this;
|
|
2927
3168
|
/**
|
|
2928
3169
|
* Emit an event and call any associated listeners.
|
|
@@ -2943,7 +3184,10 @@ export declare class EventEmitter<
|
|
|
2943
3184
|
*/
|
|
2944
3185
|
once<Key extends keyof EventsWithWildcard<Events>>(
|
|
2945
3186
|
type: Key,
|
|
2946
|
-
handler:
|
|
3187
|
+
handler: (
|
|
3188
|
+
event: EventsWithWildcard<Events>[Key],
|
|
3189
|
+
eventData: Key extends '*' ? Events[keyof Events] : never,
|
|
3190
|
+
) => void,
|
|
2947
3191
|
): this;
|
|
2948
3192
|
/**
|
|
2949
3193
|
* Gets the number of listeners for a given event.
|
|
@@ -2970,7 +3214,7 @@ export declare class EventEmitter<
|
|
|
2970
3214
|
export declare type EventsWithWildcard<
|
|
2971
3215
|
Events extends Record<EventType, unknown>,
|
|
2972
3216
|
> = Events & {
|
|
2973
|
-
'*':
|
|
3217
|
+
'*': keyof Events;
|
|
2974
3218
|
};
|
|
2975
3219
|
|
|
2976
3220
|
/**
|
|
@@ -4118,9 +4362,22 @@ export declare abstract class HTTPRequest {
|
|
|
4118
4362
|
* been received yet.
|
|
4119
4363
|
*/
|
|
4120
4364
|
abstract response(): HTTPResponse | null;
|
|
4365
|
+
/**
|
|
4366
|
+
* The page that initiated the request, or null if navigating to
|
|
4367
|
+
* error pages or the request is coming from a worker.
|
|
4368
|
+
*/
|
|
4369
|
+
abstract page(): Page | null;
|
|
4370
|
+
/**
|
|
4371
|
+
* The worker that initiated the request, or null if the request
|
|
4372
|
+
* was not initiated by a worker.
|
|
4373
|
+
*
|
|
4374
|
+
* @remarks
|
|
4375
|
+
* Not supported with WebDriver BiDi.
|
|
4376
|
+
*/
|
|
4377
|
+
abstract worker(): WebWorker | null;
|
|
4121
4378
|
/**
|
|
4122
4379
|
* The frame that initiated the request, or null if navigating to
|
|
4123
|
-
* error pages.
|
|
4380
|
+
* error pages or the request is coming from a worker.
|
|
4124
4381
|
*/
|
|
4125
4382
|
abstract frame(): Frame | null;
|
|
4126
4383
|
/**
|
|
@@ -4311,6 +4568,19 @@ export declare abstract class HTTPResponse {
|
|
|
4311
4568
|
* Timing information related to the response.
|
|
4312
4569
|
*/
|
|
4313
4570
|
abstract timing(): Protocol.Network.ResourceTiming | null;
|
|
4571
|
+
/**
|
|
4572
|
+
* Total number of bytes received for this request over the network.
|
|
4573
|
+
*
|
|
4574
|
+
* @remarks
|
|
4575
|
+
* The value is updated when the response finishes loading. During the
|
|
4576
|
+
* `response` event, it only covers the bytes received up to the response
|
|
4577
|
+
* headers. To get the total encoded transfer size (headers + compressed
|
|
4578
|
+
* body), read it in a `requestfinished` handler or after awaiting
|
|
4579
|
+
* {@link HTTPResponse.content}. If the request fails after the response is
|
|
4580
|
+
* received, the value is not updated. If the browser does not report a
|
|
4581
|
+
* size, e.g. for `data:` or `file:` URLs, the value is `0`.
|
|
4582
|
+
*/
|
|
4583
|
+
abstract encodedDataLength(): number;
|
|
4314
4584
|
/**
|
|
4315
4585
|
* Promise which resolves to a buffer with response body.
|
|
4316
4586
|
*
|
|
@@ -4323,6 +4593,19 @@ export declare abstract class HTTPResponse {
|
|
|
4323
4593
|
* https://github.com/puppeteer/puppeteer/issues/6478.
|
|
4324
4594
|
*/
|
|
4325
4595
|
abstract content(): Promise<Uint8Array>;
|
|
4596
|
+
/**
|
|
4597
|
+
* Returns the response body as a stream of chunks as they arrive from the
|
|
4598
|
+
* network.
|
|
4599
|
+
*
|
|
4600
|
+
* @remarks
|
|
4601
|
+
*
|
|
4602
|
+
* Call this from the {@link PageEvent.Response | response} event to
|
|
4603
|
+
* receive the body while it is still loading. If the body has already
|
|
4604
|
+
* finished loading, the stream contains the whole body as a single chunk.
|
|
4605
|
+
*
|
|
4606
|
+
* @experimental
|
|
4607
|
+
*/
|
|
4608
|
+
abstract stream(): Promise<ReadableStream<Uint8Array>>;
|
|
4326
4609
|
/**
|
|
4327
4610
|
* {@inheritDoc HTTPResponse.content}
|
|
4328
4611
|
*/
|
|
@@ -5518,7 +5801,10 @@ export declare abstract class Locator<T> extends EventEmitter<LocatorEvents> {
|
|
|
5518
5801
|
*
|
|
5519
5802
|
* @public
|
|
5520
5803
|
*/
|
|
5521
|
-
map<To
|
|
5804
|
+
map<To, Args extends unknown[] = []>(
|
|
5805
|
+
mapper: Mapper<T, To, Args>,
|
|
5806
|
+
...args: Args
|
|
5807
|
+
): Locator<To>;
|
|
5522
5808
|
/**
|
|
5523
5809
|
* Creates an expectation that is evaluated against located values.
|
|
5524
5810
|
*
|
|
@@ -5526,7 +5812,10 @@ export declare abstract class Locator<T> extends EventEmitter<LocatorEvents> {
|
|
|
5526
5812
|
*
|
|
5527
5813
|
* @public
|
|
5528
5814
|
*/
|
|
5529
|
-
filter<S extends T
|
|
5815
|
+
filter<S extends T, Args extends unknown[] = []>(
|
|
5816
|
+
predicate: Predicate<T, S, Args>,
|
|
5817
|
+
...args: Args
|
|
5818
|
+
): Locator<S>;
|
|
5530
5819
|
/**
|
|
5531
5820
|
* Clicks the located element.
|
|
5532
5821
|
*/
|
|
@@ -5664,7 +5953,10 @@ export declare type LowerCasePaperFormat =
|
|
|
5664
5953
|
/**
|
|
5665
5954
|
* @public
|
|
5666
5955
|
*/
|
|
5667
|
-
export declare type Mapper<From, To> = (
|
|
5956
|
+
export declare type Mapper<From, To, Args extends unknown[] = []> = (
|
|
5957
|
+
value: From,
|
|
5958
|
+
...args: InnerParams<Args>
|
|
5959
|
+
) => Awaitable<To>;
|
|
5668
5960
|
|
|
5669
5961
|
/**
|
|
5670
5962
|
* A media feature to emulate.
|
|
@@ -5739,6 +6031,16 @@ export declare interface Metrics {
|
|
|
5739
6031
|
* Total JavaScript heap size, in bytes.
|
|
5740
6032
|
*/
|
|
5741
6033
|
JSHeapTotalSize?: number;
|
|
6034
|
+
/**
|
|
6035
|
+
* The timestamp when the DOMContentLoaded event was fired, in monotonic
|
|
6036
|
+
* time (seconds since an arbitrary point in the past).
|
|
6037
|
+
*/
|
|
6038
|
+
DomContentLoaded?: number;
|
|
6039
|
+
/**
|
|
6040
|
+
* The timestamp when the navigation started, in monotonic time (seconds
|
|
6041
|
+
* since an arbitrary point in the past).
|
|
6042
|
+
*/
|
|
6043
|
+
NavigationStart?: number;
|
|
5742
6044
|
}
|
|
5743
6045
|
|
|
5744
6046
|
/**
|
|
@@ -6959,6 +7261,12 @@ export declare abstract class Page extends EventEmitter<PageEvents> {
|
|
|
6959
7261
|
*
|
|
6960
7262
|
* - `JSHeapTotalSize` : Total JavaScript heap size, in bytes.
|
|
6961
7263
|
*
|
|
7264
|
+
* - `DomContentLoaded` : The timestamp when the DOMContentLoaded event was
|
|
7265
|
+
* fired, in monotonic time (seconds).
|
|
7266
|
+
*
|
|
7267
|
+
* - `NavigationStart` : The timestamp when the navigation started, in
|
|
7268
|
+
* monotonic time (seconds).
|
|
7269
|
+
*
|
|
6962
7270
|
* @remarks
|
|
6963
7271
|
* All timestamps are in monotonic time: monotonically increasing time
|
|
6964
7272
|
* in seconds since an arbitrary point in the past.
|
|
@@ -7631,7 +7939,11 @@ export declare abstract class Page extends EventEmitter<PageEvents> {
|
|
|
7631
7939
|
*
|
|
7632
7940
|
* To generate a PDF with the `screen` media type, call
|
|
7633
7941
|
* {@link Page.emulateMediaType | `page.emulateMediaType('screen')`} before
|
|
7634
|
-
* calling `page.pdf()`.
|
|
7942
|
+
* calling `page.pdf()`. Note that this disables `@media print` stylesheets,
|
|
7943
|
+
* which may cause layout issues on pages that rely on print styles for
|
|
7944
|
+
* pagination. Call
|
|
7945
|
+
* {@link Page.emulateMediaType | `page.emulateMediaType(null)`} to restore
|
|
7946
|
+
* the default `print` media type.
|
|
7635
7947
|
*
|
|
7636
7948
|
* By default, `page.pdf()` generates a pdf with modified colors for printing.
|
|
7637
7949
|
* Use the
|
|
@@ -8558,8 +8870,13 @@ export declare const PredefinedNetworkConditions: Readonly<{
|
|
|
8558
8870
|
/**
|
|
8559
8871
|
* @public
|
|
8560
8872
|
*/
|
|
8561
|
-
export declare type Predicate<
|
|
8562
|
-
|
|
8873
|
+
export declare type Predicate<
|
|
8874
|
+
From,
|
|
8875
|
+
To extends From = From,
|
|
8876
|
+
Args extends unknown[] = [],
|
|
8877
|
+
> =
|
|
8878
|
+
| ((value: From, ...args: InnerParams<Args>) => value is To)
|
|
8879
|
+
| ((value: From, ...args: InnerParams<Args>) => Awaitable<boolean>);
|
|
8563
8880
|
|
|
8564
8881
|
declare interface ProcessExitEmitter {
|
|
8565
8882
|
once(event: 'exit', listener: () => void): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "puppeteer-core",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.17.0",
|
|
4
4
|
"description": "A high-level API to control headless Chrome over the DevTools Protocol",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"puppeteer",
|
|
@@ -91,7 +91,9 @@
|
|
|
91
91
|
"Herebyfile.mjs"
|
|
92
92
|
],
|
|
93
93
|
"output": [
|
|
94
|
-
"lib/**"
|
|
94
|
+
"lib/**",
|
|
95
|
+
"!lib/types.d.ts",
|
|
96
|
+
"!lib/es5-iife/**"
|
|
95
97
|
]
|
|
96
98
|
},
|
|
97
99
|
"build:es5": {
|
|
@@ -100,7 +102,7 @@
|
|
|
100
102
|
"rollup.config.mjs"
|
|
101
103
|
],
|
|
102
104
|
"output": [
|
|
103
|
-
"lib/es5-iife
|
|
105
|
+
"lib/es5-iife/**"
|
|
104
106
|
],
|
|
105
107
|
"dependencies": [
|
|
106
108
|
"build:tsc",
|
|
@@ -148,15 +150,15 @@
|
|
|
148
150
|
"author": "The Chromium Authors",
|
|
149
151
|
"license": "Apache-2.0",
|
|
150
152
|
"dependencies": {
|
|
151
|
-
"@puppeteer/browsers": "3.2.
|
|
153
|
+
"@puppeteer/browsers": "3.2.7",
|
|
152
154
|
"chromium-bidi": "157.0.8090-0",
|
|
153
|
-
"devtools-protocol": "0.0.
|
|
155
|
+
"devtools-protocol": "0.0.1717327",
|
|
154
156
|
"typed-query-selector": "^2.12.3",
|
|
155
|
-
"webdriver-bidi-protocol": "1.0.
|
|
156
|
-
"ws": "^8.22.
|
|
157
|
+
"webdriver-bidi-protocol": "1.0.2",
|
|
158
|
+
"ws": "^8.22.1"
|
|
157
159
|
},
|
|
158
160
|
"devDependencies": {
|
|
159
|
-
"@types/chrome": "0.3.
|
|
161
|
+
"@types/chrome": "0.3.7",
|
|
160
162
|
"@types/node": "^18.17.15",
|
|
161
163
|
"@types/ws": "8.18.2",
|
|
162
164
|
"mitt": "3.0.1",
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
raceWith,
|
|
16
16
|
} from '../../third_party/rxjs/rxjs.js';
|
|
17
17
|
import type {ProtocolType} from '../common/ConnectOptions.js';
|
|
18
|
+
import type {ConsoleMessage} from '../common/ConsoleMessage.js';
|
|
18
19
|
import type {
|
|
19
20
|
Cookie,
|
|
20
21
|
CookieData,
|
|
@@ -34,6 +35,8 @@ import {asyncDisposeSymbol, disposeSymbol} from '../util/disposable.js';
|
|
|
34
35
|
|
|
35
36
|
import type {BrowserContext} from './BrowserContext.js';
|
|
36
37
|
import type {Extension} from './Extension.js';
|
|
38
|
+
import type {HTTPRequest} from './HTTPRequest.js';
|
|
39
|
+
import type {HTTPResponse} from './HTTPResponse.js';
|
|
37
40
|
import type {Page} from './Page.js';
|
|
38
41
|
import type {Target} from './Target.js';
|
|
39
42
|
/**
|
|
@@ -205,6 +208,115 @@ export const enum BrowserEvent {
|
|
|
205
208
|
* @internal
|
|
206
209
|
*/
|
|
207
210
|
TargetDiscovered = 'targetdiscovered',
|
|
211
|
+
/**
|
|
212
|
+
* Emitted when JavaScript within any page or worker in the browser calls
|
|
213
|
+
* one of the console API methods, e.g. `console.log` or `console.dir`.
|
|
214
|
+
* Contains a {@link ConsoleMessage} instance.
|
|
215
|
+
*
|
|
216
|
+
* @remarks
|
|
217
|
+
* Use {@link ConsoleMessage.page}, {@link ConsoleMessage.frame} or
|
|
218
|
+
* {@link ConsoleMessage.worker} to identify the originating context.
|
|
219
|
+
* Messages from workers have no page or frame: use
|
|
220
|
+
* {@link ConsoleMessage.worker} for them. Messages logged by the browser
|
|
221
|
+
* itself (e.g. network errors or violations) can have no page, frame or
|
|
222
|
+
* worker.
|
|
223
|
+
*
|
|
224
|
+
* Events are only delivered for pages and workers that Puppeteer has
|
|
225
|
+
* attached to, e.g. via {@link Browser.pages} or {@link Target.page}.
|
|
226
|
+
* Registering the listener before attaching guarantees that console
|
|
227
|
+
* messages replayed by the browser on attachment are not lost.
|
|
228
|
+
*
|
|
229
|
+
* With WebDriver BiDi, console messages that the browser replays while
|
|
230
|
+
* connecting are delivered once, right after {@link Puppeteer.connect}
|
|
231
|
+
* resolves: register the listener before awaiting anything else, or they
|
|
232
|
+
* are missed. Replayed messages can be delivered after messages logged
|
|
233
|
+
* later.
|
|
234
|
+
*
|
|
235
|
+
* Service workers and shared workers are not attached automatically:
|
|
236
|
+
* their console messages are only delivered after {@link Target.worker}
|
|
237
|
+
* has been called for their target. With WebDriver BiDi, their console
|
|
238
|
+
* messages are not reported.
|
|
239
|
+
*
|
|
240
|
+
* The {@link ConsoleMessage.args | arguments} are shared with listeners
|
|
241
|
+
* registered on {@link Page}, {@link WebWorker} and {@link BrowserContext}.
|
|
242
|
+
* Disposing them in one listener invalidates them for all other listeners.
|
|
243
|
+
*
|
|
244
|
+
* @experimental
|
|
245
|
+
*/
|
|
246
|
+
Console = 'console',
|
|
247
|
+
/**
|
|
248
|
+
* Emitted when any page in the browser issues a request. Contains a
|
|
249
|
+
* {@link HTTPRequest} instance.
|
|
250
|
+
*
|
|
251
|
+
* @remarks
|
|
252
|
+
* Use {@link HTTPRequest.page} or {@link HTTPRequest.frame} to identify
|
|
253
|
+
* the originating context. Requests from dedicated workers have no page
|
|
254
|
+
* or frame: use {@link HTTPRequest.worker} for them. Dedicated worker
|
|
255
|
+
* requests and {@link HTTPRequest.worker} are not supported with
|
|
256
|
+
* WebDriver BiDi.
|
|
257
|
+
*
|
|
258
|
+
* With CDP, events are only delivered for pages that have a {@link Page}
|
|
259
|
+
* instance, e.g. created via {@link Browser.pages} or {@link Target.page}.
|
|
260
|
+
* Requests issued before the instance exists, such as the initial
|
|
261
|
+
* navigation of a popup, are not reported. With WebDriver BiDi, requests
|
|
262
|
+
* from all pages are reported. Requests from service workers and shared
|
|
263
|
+
* workers are not reported.
|
|
264
|
+
*
|
|
265
|
+
* These listeners only observe requests. Do not call
|
|
266
|
+
* `request.continue()`, `abort()` or `respond()` from them: they are not
|
|
267
|
+
* coordinated with page-level handlers (see
|
|
268
|
+
* {@link https://pptr.dev/guides/network-interception#cooperative-intercept-mode | cooperative intercept mode}).
|
|
269
|
+
* To intercept requests, use {@link Page.setRequestInterception} with a
|
|
270
|
+
* {@link PageEvent.Request} listener.
|
|
271
|
+
*
|
|
272
|
+
* @experimental
|
|
273
|
+
*/
|
|
274
|
+
Request = 'request',
|
|
275
|
+
/**
|
|
276
|
+
* Emitted when a request issued by any page in the browser is served from
|
|
277
|
+
* the memory cache. Contains a {@link HTTPRequest} instance.
|
|
278
|
+
*
|
|
279
|
+
* @remarks
|
|
280
|
+
* The same delivery rules as for {@link BrowserEvent.Request} apply.
|
|
281
|
+
*
|
|
282
|
+
* @experimental
|
|
283
|
+
*/
|
|
284
|
+
RequestServedFromCache = 'requestservedfromcache',
|
|
285
|
+
/**
|
|
286
|
+
* Emitted when a response is received for a request issued by any page in
|
|
287
|
+
* the browser. Contains a {@link HTTPResponse} instance.
|
|
288
|
+
*
|
|
289
|
+
* @remarks
|
|
290
|
+
* Use {@link HTTPResponse.request} to access the originating request. The
|
|
291
|
+
* same delivery rules as for {@link BrowserEvent.Request} apply.
|
|
292
|
+
*
|
|
293
|
+
* @experimental
|
|
294
|
+
*/
|
|
295
|
+
Response = 'response',
|
|
296
|
+
/**
|
|
297
|
+
* Emitted when a request issued by any page in the browser fails, for
|
|
298
|
+
* example by timing out. Contains a {@link HTTPRequest} instance.
|
|
299
|
+
*
|
|
300
|
+
* @remarks
|
|
301
|
+
* HTTP error responses, such as 404 or 503, are still successful responses
|
|
302
|
+
* from HTTP standpoint, so the request completes with
|
|
303
|
+
* {@link BrowserEvent.RequestFinished} and not with
|
|
304
|
+
* {@link BrowserEvent.RequestFailed}. The same delivery rules as for
|
|
305
|
+
* {@link BrowserEvent.Request} apply.
|
|
306
|
+
*
|
|
307
|
+
* @experimental
|
|
308
|
+
*/
|
|
309
|
+
RequestFailed = 'requestfailed',
|
|
310
|
+
/**
|
|
311
|
+
* Emitted when a request issued by any page in the browser finishes
|
|
312
|
+
* successfully. Contains a {@link HTTPRequest} instance.
|
|
313
|
+
*
|
|
314
|
+
* @remarks
|
|
315
|
+
* The same delivery rules as for {@link BrowserEvent.Request} apply.
|
|
316
|
+
*
|
|
317
|
+
* @experimental
|
|
318
|
+
*/
|
|
319
|
+
RequestFinished = 'requestfinished',
|
|
208
320
|
}
|
|
209
321
|
|
|
210
322
|
/**
|
|
@@ -215,6 +327,12 @@ export interface BrowserEvents extends Record<EventType, unknown> {
|
|
|
215
327
|
[BrowserEvent.TargetCreated]: Target;
|
|
216
328
|
[BrowserEvent.TargetDestroyed]: Target;
|
|
217
329
|
[BrowserEvent.TargetChanged]: Target;
|
|
330
|
+
[BrowserEvent.Console]: ConsoleMessage;
|
|
331
|
+
[BrowserEvent.Request]: HTTPRequest;
|
|
332
|
+
[BrowserEvent.RequestServedFromCache]: HTTPRequest;
|
|
333
|
+
[BrowserEvent.Response]: HTTPResponse;
|
|
334
|
+
[BrowserEvent.RequestFailed]: HTTPRequest;
|
|
335
|
+
[BrowserEvent.RequestFinished]: HTTPRequest;
|
|
218
336
|
/**
|
|
219
337
|
* @internal
|
|
220
338
|
*/
|