chrome-devtools-frontend 1.0.923319 → 1.0.925171
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/config/gni/all_devtools_files.gni +0 -1
- package/config/gni/devtools_grd_files.gni +1 -3
- package/config/gni/devtools_image_files.gni +1 -1
- package/front_end/Images/src/copy_icon.svg +79 -0
- package/front_end/core/common/EventTarget.ts +22 -27
- package/front_end/core/common/Object.ts +28 -26
- package/front_end/core/common/Settings.ts +9 -8
- package/front_end/core/i18n/locales/en-US.json +18 -39
- package/front_end/core/i18n/locales/en-XL.json +18 -39
- package/front_end/core/platform/string-utilities.ts +4 -3
- package/front_end/core/sdk/EmulationModel.ts +1 -1
- package/front_end/core/sdk/NetworkManager.ts +1 -2
- package/front_end/core/sdk/ResourceTreeModel.ts +2 -3
- package/front_end/core/sdk/RuntimeModel.ts +2 -3
- package/front_end/core/sdk/SourceMap.ts +74 -31
- package/front_end/core/sdk/TargetManager.ts +9 -8
- package/front_end/core/sdk/TracingManager.ts +1 -1
- package/front_end/entrypoints/main/MainImpl.ts +1 -1
- package/front_end/entrypoints/node_main/NodeMain.ts +1 -1
- package/front_end/generated/InspectorBackendCommands.js +9 -5
- package/front_end/generated/protocol-mapping.d.ts +1 -0
- package/front_end/generated/protocol-proxy-api.d.ts +1 -0
- package/front_end/generated/protocol.d.ts +13 -2
- package/front_end/legacy_test_runner/application_test_runner/application_test_runner.js +0 -1
- package/front_end/models/bindings/CompilerScriptMapping.ts +24 -6
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +30 -30
- package/front_end/models/extensions/ExtensionServer.ts +10 -13
- package/front_end/models/workspace/WorkspaceImpl.ts +1 -1
- package/front_end/models/workspace_diff/WorkspaceDiff.ts +24 -20
- package/front_end/panels/animation/AnimationModel.ts +6 -1
- package/front_end/panels/animation/AnimationTimeline.ts +2 -2
- package/front_end/panels/application/AppManifestView.ts +58 -20
- package/front_end/panels/application/ApplicationPanelCacheSection.ts +1 -59
- package/front_end/panels/application/ApplicationPanelSidebar.ts +15 -163
- package/front_end/panels/application/BackgroundServiceModel.ts +6 -1
- package/front_end/panels/application/BackgroundServiceView.ts +4 -4
- package/front_end/panels/application/DatabaseModel.ts +6 -1
- package/front_end/panels/application/DatabaseTableView.ts +1 -1
- package/front_end/panels/application/IndexedDBModel.ts +9 -1
- package/front_end/panels/application/IndexedDBViews.ts +6 -7
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +1 -1
- package/front_end/panels/application/ServiceWorkersView.ts +3 -3
- package/front_end/panels/application/StorageItemsView.ts +2 -3
- package/front_end/panels/application/StorageView.ts +0 -13
- package/front_end/panels/application/appManifestView.css +8 -0
- package/front_end/panels/application/application-legacy.ts +0 -3
- package/front_end/panels/application/application.ts +0 -4
- package/front_end/panels/browser_debugger/ObjectEventListenersSidebarPane.ts +1 -1
- package/front_end/panels/console/ConsolePinPane.ts +1 -2
- package/front_end/panels/console/ConsoleSidebar.ts +2 -2
- package/front_end/panels/console/ConsoleView.ts +7 -6
- package/front_end/panels/console/ConsoleViewMessage.ts +4 -3
- package/front_end/panels/coverage/CoverageModel.ts +9 -3
- package/front_end/panels/coverage/CoverageView.ts +3 -2
- package/front_end/panels/css_overview/CSSOverviewModel.ts +1 -1
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +1 -1
- package/front_end/panels/elements/ComputedStyleWidget.ts +2 -2
- package/front_end/panels/elements/ElementsPanel.ts +3 -3
- package/front_end/panels/elements/StylePropertyTreeElement.ts +14 -4
- package/front_end/panels/elements/StylesSidebarPane.ts +4 -2
- package/front_end/panels/input/InputModel.ts +1 -1
- package/front_end/panels/issues/ComboBoxOfCheckBoxes.ts +2 -4
- package/front_end/panels/issues/HiddenIssuesRow.ts +7 -12
- package/front_end/panels/layers/LayerTreeModel.ts +6 -1
- package/front_end/panels/layers/LayersPanel.ts +3 -4
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +1 -0
- package/front_end/panels/media/MainView.ts +22 -19
- package/front_end/panels/media/MediaModel.ts +15 -7
- package/front_end/panels/media/PlayerMessagesView.ts +2 -4
- package/front_end/panels/network/NetworkPanel.ts +6 -6
- package/front_end/panels/network/RequestHeadersView.ts +7 -0
- package/front_end/panels/network/networkLogView.css +5 -0
- package/front_end/panels/profiler/HeapProfileView.ts +14 -4
- package/front_end/panels/profiler/HeapSnapshotView.ts +54 -22
- package/front_end/panels/profiler/LiveHeapProfileView.ts +2 -2
- package/front_end/panels/profiler/ProfileHeader.ts +11 -2
- package/front_end/panels/profiler/ProfileView.ts +3 -3
- package/front_end/panels/profiler/ProfilesPanel.ts +7 -6
- package/front_end/panels/screencast/InputModel.ts +1 -1
- package/front_end/panels/screencast/ScreencastView.ts +1 -1
- package/front_end/panels/security/SecurityModel.ts +5 -1
- package/front_end/panels/security/SecurityPanel.ts +1 -2
- package/front_end/panels/sensors/SensorsView.ts +3 -2
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +6 -3
- package/front_end/panels/sources/CSSPlugin.ts +1 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +6 -4
- package/front_end/panels/sources/InplaceFormatterEditorAction.ts +1 -1
- package/front_end/panels/sources/ScriptFormatterEditorAction.ts +1 -1
- package/front_end/panels/sources/SourcesPanel.ts +2 -2
- package/front_end/panels/timeline/TimelineFlameChartView.ts +5 -8
- package/front_end/panels/timeline/TimelineUIUtils.ts +1 -2
- package/front_end/panels/web_audio/AudioContextSelector.ts +4 -6
- package/front_end/panels/web_audio/WebAudioModel.ts +19 -1
- package/front_end/panels/web_audio/WebAudioView.ts +28 -22
- package/front_end/panels/web_audio/graph_visualizer/graph_visualizer.ts +0 -7
- package/front_end/panels/web_audio/web_audio.ts +1 -23
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +598 -595
- package/front_end/third_party/lighthouse/locales/en-US.json +6 -0
- package/front_end/third_party/lighthouse/locales/en-XL.json +6 -0
- package/front_end/third_party/lighthouse/report/bundle.d.ts +25 -4
- package/front_end/third_party/lighthouse/report/bundle.js +111 -22
- package/front_end/third_party/lighthouse/report-assets/report.css +120 -12
- package/front_end/third_party/lighthouse/report-assets/report.js +10 -10
- package/front_end/third_party/puppeteer/README.chromium +1 -1
- package/front_end/third_party/puppeteer/package/CHANGELOG.md +66 -0
- package/front_end/third_party/puppeteer/package/README.md +34 -13
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js +5 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.d.ts +18 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.js +8 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Connection.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.d.ts +22 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.js +14 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Coverage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js +10 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DeviceDescriptors.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DeviceDescriptors.js +120 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DeviceDescriptors.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EvalTypes.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EvalTypes.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts +62 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js +131 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.d.ts +40 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.js +76 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Input.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts +53 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js +82 -13
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js +14 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.d.ts +1053 -29
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js +1114 -22
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Tracing.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Tracing.js +17 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Tracing.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/assert.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/assert.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/assert.js +6 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/assert.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.d.ts +21 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.js +47 -28
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/helper.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/global.d.ts +17 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/global.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/global.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/global.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.js +9 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserFetcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserRunner.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.d.ts +10 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js +83 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Launcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/NodeWebSocketTransport.js +7 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/NodeWebSocketTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/Puppeteer.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/install.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/install.js +17 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/install.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js +5 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts +18 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js +8 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts +22 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js +14 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js +10 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.js +120 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts +62 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js +131 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts +40 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.js +76 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts +53 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js +82 -13
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js +14 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts +1053 -29
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js +1115 -23
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.js +17 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.js +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.d.ts +21 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js +32 -13
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/global.d.ts +17 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/global.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/global.js +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/global.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js +9 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts +10 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js +83 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.js +7 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.js +17 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/install.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +1382 -19726
- package/front_end/third_party/puppeteer/package/package.json +9 -6
- package/front_end/third_party/wasmparser/README.chromium +2 -2
- package/front_end/third_party/wasmparser/package/CHANGELOG.md +13 -0
- package/front_end/third_party/wasmparser/package/dist/cjs/WasmDis.js +50 -10
- package/front_end/third_party/wasmparser/package/dist/cjs/WasmDis.js.map +1 -1
- package/front_end/third_party/wasmparser/package/dist/cjs/WasmParser.d.ts +21 -4
- package/front_end/third_party/wasmparser/package/dist/cjs/WasmParser.js +76 -8
- package/front_end/third_party/wasmparser/package/dist/cjs/WasmParser.js.map +1 -1
- package/front_end/third_party/wasmparser/package/dist/esm/WasmDis.js +50 -10
- package/front_end/third_party/wasmparser/package/dist/esm/WasmDis.js.map +1 -1
- package/front_end/third_party/wasmparser/package/dist/esm/WasmParser.d.ts +21 -4
- package/front_end/third_party/wasmparser/package/dist/esm/WasmParser.js +76 -8
- package/front_end/third_party/wasmparser/package/dist/esm/WasmParser.js.map +1 -1
- package/front_end/third_party/wasmparser/package/package.json +1 -1
- package/front_end/third_party/wasmparser/package/src/WasmDis.ts +47 -10
- package/front_end/third_party/wasmparser/package/src/WasmParser.ts +75 -5
- package/front_end/ui/components/icon_button/iconButton.css +4 -0
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +2 -6
- package/front_end/ui/legacy/FilterBar.ts +1 -1
- package/front_end/ui/legacy/GlassPane.ts +1 -3
- package/front_end/ui/legacy/SplitWidget.ts +1 -1
- package/front_end/ui/legacy/UIUtils.ts +3 -4
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +3 -3
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/SwatchPopoverHelper.ts +6 -2
- package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +3 -3
- package/front_end/ui/legacy/components/utils/TargetDetachedDialog.ts +1 -1
- package/front_end/ui/legacy/reportView.css +1 -0
- package/package.json +1 -1
- package/scripts/build/rollup.config.js +0 -5
- package/front_end/Images/src/exclamation_mark_circle_icon.svg +0 -65
- package/front_end/legacy_test_runner/application_test_runner/AppcacheTestRunner.js +0 -220
- package/front_end/panels/application/ApplicationCacheItemsView.ts +0 -335
- package/front_end/panels/application/ApplicationCacheModel.ts +0 -206
|
@@ -119,6 +119,12 @@ export declare class HTTPRequest {
|
|
|
119
119
|
private _postData?;
|
|
120
120
|
private _headers;
|
|
121
121
|
private _frame;
|
|
122
|
+
private _continueRequestOverrides;
|
|
123
|
+
private _responseForRequest;
|
|
124
|
+
private _abortErrorReason;
|
|
125
|
+
private _currentStrategy;
|
|
126
|
+
private _currentPriority;
|
|
127
|
+
private _interceptActions;
|
|
122
128
|
/**
|
|
123
129
|
* @internal
|
|
124
130
|
*/
|
|
@@ -127,6 +133,39 @@ export declare class HTTPRequest {
|
|
|
127
133
|
* @returns the URL of the request
|
|
128
134
|
*/
|
|
129
135
|
url(): string;
|
|
136
|
+
/**
|
|
137
|
+
* @returns the `ContinueRequestOverrides` that will be used
|
|
138
|
+
* if the interception is allowed to continue (ie, `abort()` and
|
|
139
|
+
* `respond()` aren't called).
|
|
140
|
+
*/
|
|
141
|
+
continueRequestOverrides(): ContinueRequestOverrides;
|
|
142
|
+
/**
|
|
143
|
+
* @returns The `ResponseForRequest` that gets used if the
|
|
144
|
+
* interception is allowed to respond (ie, `abort()` is not called).
|
|
145
|
+
*/
|
|
146
|
+
responseForRequest(): Partial<ResponseForRequest>;
|
|
147
|
+
/**
|
|
148
|
+
* @returns the most recent reason for aborting the request
|
|
149
|
+
*/
|
|
150
|
+
abortErrorReason(): Protocol.Network.ErrorReason;
|
|
151
|
+
/**
|
|
152
|
+
* @returns An array of the current intercept resolution strategy and priority
|
|
153
|
+
* `[strategy,priority]`. Strategy is one of: `abort`, `respond`, `continue`,
|
|
154
|
+
* `disabled`, `none`, or `already-handled`.
|
|
155
|
+
*/
|
|
156
|
+
private interceptResolution;
|
|
157
|
+
/**
|
|
158
|
+
* Adds an async request handler to the processing queue.
|
|
159
|
+
* Deferred handlers are not guaranteed to execute in any particular order,
|
|
160
|
+
* but they are guarnateed to resolve before the request interception
|
|
161
|
+
* is finalized.
|
|
162
|
+
*/
|
|
163
|
+
enqueueInterceptAction(pendingHandler: () => void | PromiseLike<unknown>): void;
|
|
164
|
+
/**
|
|
165
|
+
* Awaits pending interception handlers and then decides how to fulfill
|
|
166
|
+
* the request interception.
|
|
167
|
+
*/
|
|
168
|
+
finalizeInterceptions(): Promise<void>;
|
|
130
169
|
/**
|
|
131
170
|
* Contains the request's resource type as it was perceived by the rendering
|
|
132
171
|
* engine.
|
|
@@ -234,8 +273,12 @@ export declare class HTTPRequest {
|
|
|
234
273
|
* ```
|
|
235
274
|
*
|
|
236
275
|
* @param overrides - optional overrides to apply to the request.
|
|
276
|
+
* @param priority - If provided, intercept is resolved using
|
|
277
|
+
* cooperative handling rules. Otherwise, intercept is resolved
|
|
278
|
+
* immediately.
|
|
237
279
|
*/
|
|
238
|
-
continue(overrides?: ContinueRequestOverrides): Promise<void>;
|
|
280
|
+
continue(overrides?: ContinueRequestOverrides, priority?: number): Promise<void>;
|
|
281
|
+
private _continue;
|
|
239
282
|
/**
|
|
240
283
|
* Fulfills a request with the given response.
|
|
241
284
|
*
|
|
@@ -263,8 +306,12 @@ export declare class HTTPRequest {
|
|
|
263
306
|
* Calling `request.respond` for a dataURL request is a noop.
|
|
264
307
|
*
|
|
265
308
|
* @param response - the response to fulfill the request with.
|
|
309
|
+
* @param priority - If provided, intercept is resolved using
|
|
310
|
+
* cooperative handling rules. Otherwise, intercept is resolved
|
|
311
|
+
* immediately.
|
|
266
312
|
*/
|
|
267
|
-
respond(response: Partial<ResponseForRequest
|
|
313
|
+
respond(response: Partial<ResponseForRequest>, priority?: number): Promise<void>;
|
|
314
|
+
private _respond;
|
|
268
315
|
/**
|
|
269
316
|
* Aborts a request.
|
|
270
317
|
*
|
|
@@ -274,11 +321,23 @@ export declare class HTTPRequest {
|
|
|
274
321
|
* throw an exception immediately.
|
|
275
322
|
*
|
|
276
323
|
* @param errorCode - optional error code to provide.
|
|
324
|
+
* @param priority - If provided, intercept is resolved using
|
|
325
|
+
* cooperative handling rules. Otherwise, intercept is resolved
|
|
326
|
+
* immediately.
|
|
277
327
|
*/
|
|
278
|
-
abort(errorCode?: ErrorCode): Promise<void>;
|
|
328
|
+
abort(errorCode?: ErrorCode, priority?: number): Promise<void>;
|
|
329
|
+
private _abort;
|
|
279
330
|
}
|
|
331
|
+
/**
|
|
332
|
+
* @public
|
|
333
|
+
*/
|
|
334
|
+
export declare type InterceptResolutionStrategy = 'abort' | 'respond' | 'continue' | 'disabled' | 'none' | 'alreay-handled';
|
|
280
335
|
/**
|
|
281
336
|
* @public
|
|
282
337
|
*/
|
|
283
338
|
export declare type ErrorCode = 'aborted' | 'accessdenied' | 'addressunreachable' | 'blockedbyclient' | 'blockedbyresponse' | 'connectionaborted' | 'connectionclosed' | 'connectionfailed' | 'connectionrefused' | 'connectionreset' | 'internetdisconnected' | 'namenotresolved' | 'timedout' | 'failed';
|
|
339
|
+
/**
|
|
340
|
+
* @public
|
|
341
|
+
*/
|
|
342
|
+
export declare type ActionResult = 'continue' | 'abort' | 'respond';
|
|
284
343
|
//# sourceMappingURL=HTTPRequest.d.ts.map
|
package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/HTTPRequest.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTTPRequest.d.ts","sourceRoot":"","sources":["../../../../src/common/HTTPRequest.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,oBAAY,YAAY,GAAG,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,qBAAa,WAAW;IACtB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,YAAY,MAAQ;IACpB;;OAEG;IACH,SAAS,EAAE,YAAY,GAAG,IAAI,CAAQ;IACtC;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AI,CAAC;YAqBF,MAAM;CAgBrB;AAED;;GAEG;AACH,oBAAY,2BAA2B,GACnC,OAAO,GACP,SAAS,GACT,UAAU,GACV,UAAU,GACV,MAAM,GACN,gBAAgB,CAAC;AAErB;;GAEG;AACH,oBAAY,SAAS,GACjB,SAAS,GACT,cAAc,GACd,oBAAoB,GACpB,iBAAiB,GACjB,mBAAmB,GACnB,mBAAmB,GACnB,kBAAkB,GAClB,kBAAkB,GAClB,mBAAmB,GACnB,iBAAiB,GACjB,sBAAsB,GACtB,iBAAiB,GACjB,UAAU,GACV,QAAQ,CAAC;AAmBb;;GAEG;AACH,oBAAY,YAAY,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC"}
|
|
@@ -66,6 +66,10 @@ class HTTPRequest {
|
|
|
66
66
|
this._postData = event.request.postData;
|
|
67
67
|
this._frame = frame;
|
|
68
68
|
this._redirectChain = redirectChain;
|
|
69
|
+
this._continueRequestOverrides = {};
|
|
70
|
+
this._currentStrategy = 'none';
|
|
71
|
+
this._currentPriority = undefined;
|
|
72
|
+
this._interceptActions = [];
|
|
69
73
|
for (const key of Object.keys(event.request.headers))
|
|
70
74
|
this._headers[key.toLowerCase()] = event.request.headers[key];
|
|
71
75
|
}
|
|
@@ -75,6 +79,71 @@ class HTTPRequest {
|
|
|
75
79
|
url() {
|
|
76
80
|
return this._url;
|
|
77
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* @returns the `ContinueRequestOverrides` that will be used
|
|
84
|
+
* if the interception is allowed to continue (ie, `abort()` and
|
|
85
|
+
* `respond()` aren't called).
|
|
86
|
+
*/
|
|
87
|
+
continueRequestOverrides() {
|
|
88
|
+
assert_js_1.assert(this._allowInterception, 'Request Interception is not enabled!');
|
|
89
|
+
return this._continueRequestOverrides;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* @returns The `ResponseForRequest` that gets used if the
|
|
93
|
+
* interception is allowed to respond (ie, `abort()` is not called).
|
|
94
|
+
*/
|
|
95
|
+
responseForRequest() {
|
|
96
|
+
assert_js_1.assert(this._allowInterception, 'Request Interception is not enabled!');
|
|
97
|
+
return this._responseForRequest;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* @returns the most recent reason for aborting the request
|
|
101
|
+
*/
|
|
102
|
+
abortErrorReason() {
|
|
103
|
+
assert_js_1.assert(this._allowInterception, 'Request Interception is not enabled!');
|
|
104
|
+
return this._abortErrorReason;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* @returns An array of the current intercept resolution strategy and priority
|
|
108
|
+
* `[strategy,priority]`. Strategy is one of: `abort`, `respond`, `continue`,
|
|
109
|
+
* `disabled`, `none`, or `already-handled`.
|
|
110
|
+
*/
|
|
111
|
+
interceptResolution() {
|
|
112
|
+
if (!this._allowInterception)
|
|
113
|
+
return ['disabled'];
|
|
114
|
+
if (this._interceptionHandled)
|
|
115
|
+
return ['alreay-handled'];
|
|
116
|
+
return [this._currentStrategy, this._currentPriority];
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Adds an async request handler to the processing queue.
|
|
120
|
+
* Deferred handlers are not guaranteed to execute in any particular order,
|
|
121
|
+
* but they are guarnateed to resolve before the request interception
|
|
122
|
+
* is finalized.
|
|
123
|
+
*/
|
|
124
|
+
enqueueInterceptAction(pendingHandler) {
|
|
125
|
+
this._interceptActions.push(pendingHandler);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Awaits pending interception handlers and then decides how to fulfill
|
|
129
|
+
* the request interception.
|
|
130
|
+
*/
|
|
131
|
+
async finalizeInterceptions() {
|
|
132
|
+
await this._interceptActions.reduce((promiseChain, interceptAction) => promiseChain.then(interceptAction).catch((error) => {
|
|
133
|
+
// This is here so cooperative handlers that fail do not stop other handlers
|
|
134
|
+
// from running
|
|
135
|
+
helper_js_1.debugError(error);
|
|
136
|
+
}), Promise.resolve());
|
|
137
|
+
const [resolution] = this.interceptResolution();
|
|
138
|
+
switch (resolution) {
|
|
139
|
+
case 'abort':
|
|
140
|
+
return this._abort(this._abortErrorReason);
|
|
141
|
+
case 'respond':
|
|
142
|
+
return this._respond(this._responseForRequest);
|
|
143
|
+
case 'continue':
|
|
144
|
+
return this._continue(this._continueRequestOverrides);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
78
147
|
/**
|
|
79
148
|
* Contains the request's resource type as it was perceived by the rendering
|
|
80
149
|
* engine.
|
|
@@ -202,13 +271,36 @@ class HTTPRequest {
|
|
|
202
271
|
* ```
|
|
203
272
|
*
|
|
204
273
|
* @param overrides - optional overrides to apply to the request.
|
|
274
|
+
* @param priority - If provided, intercept is resolved using
|
|
275
|
+
* cooperative handling rules. Otherwise, intercept is resolved
|
|
276
|
+
* immediately.
|
|
205
277
|
*/
|
|
206
|
-
async continue(overrides = {}) {
|
|
278
|
+
async continue(overrides = {}, priority) {
|
|
207
279
|
// Request interception is not supported for data: urls.
|
|
208
280
|
if (this._url.startsWith('data:'))
|
|
209
281
|
return;
|
|
210
282
|
assert_js_1.assert(this._allowInterception, 'Request Interception is not enabled!');
|
|
211
283
|
assert_js_1.assert(!this._interceptionHandled, 'Request is already handled!');
|
|
284
|
+
if (priority === undefined) {
|
|
285
|
+
return this._continue(overrides);
|
|
286
|
+
}
|
|
287
|
+
this._continueRequestOverrides = overrides;
|
|
288
|
+
if (priority > this._currentPriority ||
|
|
289
|
+
this._currentPriority === undefined) {
|
|
290
|
+
this._currentStrategy = 'continue';
|
|
291
|
+
this._currentPriority = priority;
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
if (priority === this._currentPriority) {
|
|
295
|
+
if (this._currentStrategy === 'abort' ||
|
|
296
|
+
this._currentStrategy === 'respond') {
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
this._currentStrategy = 'continue';
|
|
300
|
+
}
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
async _continue(overrides = {}) {
|
|
212
304
|
const { url, method, postData, headers } = overrides;
|
|
213
305
|
this._interceptionHandled = true;
|
|
214
306
|
const postDataBinaryBase64 = postData
|
|
@@ -256,13 +348,34 @@ class HTTPRequest {
|
|
|
256
348
|
* Calling `request.respond` for a dataURL request is a noop.
|
|
257
349
|
*
|
|
258
350
|
* @param response - the response to fulfill the request with.
|
|
351
|
+
* @param priority - If provided, intercept is resolved using
|
|
352
|
+
* cooperative handling rules. Otherwise, intercept is resolved
|
|
353
|
+
* immediately.
|
|
259
354
|
*/
|
|
260
|
-
async respond(response) {
|
|
355
|
+
async respond(response, priority) {
|
|
261
356
|
// Mocking responses for dataURL requests is not currently supported.
|
|
262
357
|
if (this._url.startsWith('data:'))
|
|
263
358
|
return;
|
|
264
359
|
assert_js_1.assert(this._allowInterception, 'Request Interception is not enabled!');
|
|
265
360
|
assert_js_1.assert(!this._interceptionHandled, 'Request is already handled!');
|
|
361
|
+
if (priority === undefined) {
|
|
362
|
+
return this._respond(response);
|
|
363
|
+
}
|
|
364
|
+
this._responseForRequest = response;
|
|
365
|
+
if (priority > this._currentPriority ||
|
|
366
|
+
this._currentPriority === undefined) {
|
|
367
|
+
this._currentStrategy = 'respond';
|
|
368
|
+
this._currentPriority = priority;
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
if (priority === this._currentPriority) {
|
|
372
|
+
if (this._currentStrategy === 'abort') {
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
this._currentStrategy = 'respond';
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
async _respond(response) {
|
|
266
379
|
this._interceptionHandled = true;
|
|
267
380
|
const responseBody = response.body && helper_js_1.helper.isString(response.body)
|
|
268
381
|
? Buffer.from(response.body)
|
|
@@ -300,8 +413,11 @@ class HTTPRequest {
|
|
|
300
413
|
* throw an exception immediately.
|
|
301
414
|
*
|
|
302
415
|
* @param errorCode - optional error code to provide.
|
|
416
|
+
* @param priority - If provided, intercept is resolved using
|
|
417
|
+
* cooperative handling rules. Otherwise, intercept is resolved
|
|
418
|
+
* immediately.
|
|
303
419
|
*/
|
|
304
|
-
async abort(errorCode = 'failed') {
|
|
420
|
+
async abort(errorCode = 'failed', priority) {
|
|
305
421
|
// Request interception is not supported for data: urls.
|
|
306
422
|
if (this._url.startsWith('data:'))
|
|
307
423
|
return;
|
|
@@ -309,6 +425,18 @@ class HTTPRequest {
|
|
|
309
425
|
assert_js_1.assert(errorReason, 'Unknown error code: ' + errorCode);
|
|
310
426
|
assert_js_1.assert(this._allowInterception, 'Request Interception is not enabled!');
|
|
311
427
|
assert_js_1.assert(!this._interceptionHandled, 'Request is already handled!');
|
|
428
|
+
if (priority === undefined) {
|
|
429
|
+
return this._abort(errorReason);
|
|
430
|
+
}
|
|
431
|
+
this._abortErrorReason = errorReason;
|
|
432
|
+
if (priority >= this._currentPriority ||
|
|
433
|
+
this._currentPriority === undefined) {
|
|
434
|
+
this._currentStrategy = 'abort';
|
|
435
|
+
this._currentPriority = priority;
|
|
436
|
+
return;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
async _abort(errorReason) {
|
|
312
440
|
this._interceptionHandled = true;
|
|
313
441
|
await this._client
|
|
314
442
|
.send('Fetch.failRequest', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTTPRequest.js","sourceRoot":"","sources":["../../../../src/common/HTTPRequest.ts"],"names":[],"mappings":";;;AAkBA,2CAAqC;AACrC,2CAAiD;AAsCjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAa,WAAW;
|
|
1
|
+
{"version":3,"file":"HTTPRequest.js","sourceRoot":"","sources":["../../../../src/common/HTTPRequest.ts"],"names":[],"mappings":";;;AAkBA,2CAAqC;AACrC,2CAAiD;AAsCjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAa,WAAW;IA4CtB;;OAEG;IACH,YACE,MAAkB,EAClB,KAAY,EACZ,cAAsB,EACtB,iBAA0B,EAC1B,KAA8C,EAC9C,aAA4B;QA5C9B;;WAE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CAChC,CAAC"}
|
|
@@ -13,8 +13,12 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import { Protocol } from 'devtools-protocol';
|
|
17
|
+
|
|
16
18
|
import { CDPSession } from './Connection.js';
|
|
19
|
+
import { Point } from './JSHandle.js';
|
|
17
20
|
import { KeyInput } from './USKeyboardLayout.js';
|
|
21
|
+
|
|
18
22
|
/**
|
|
19
23
|
* Keyboard provides an api for managing a virtual keyboard.
|
|
20
24
|
* The high level api is {@link Keyboard."type"},
|
|
@@ -300,6 +304,42 @@ export declare class Mouse {
|
|
|
300
304
|
* ```
|
|
301
305
|
*/
|
|
302
306
|
wheel(options?: MouseWheelOptions): Promise<void>;
|
|
307
|
+
/**
|
|
308
|
+
* Dispatches a `drag` event.
|
|
309
|
+
* @param start - starting point for drag
|
|
310
|
+
* @param target - point to drag to
|
|
311
|
+
*/
|
|
312
|
+
drag(start: Point, target: Point): Promise<Protocol.Input.DragData>;
|
|
313
|
+
/**
|
|
314
|
+
* Dispatches a `dragenter` event.
|
|
315
|
+
* @param target - point for emitting `dragenter` event
|
|
316
|
+
*/
|
|
317
|
+
dragEnter(target: Point, data: Protocol.Input.DragData): Promise<void>;
|
|
318
|
+
/**
|
|
319
|
+
* Dispatches a `dragover` event.
|
|
320
|
+
* @param target - point for emitting `dragover` event
|
|
321
|
+
*/
|
|
322
|
+
dragOver(target: Point, data: Protocol.Input.DragData): Promise<void>;
|
|
323
|
+
/**
|
|
324
|
+
* Performs a dragenter, dragover, and drop in sequence.
|
|
325
|
+
* @param target - point to drop on
|
|
326
|
+
* @param data - drag data containing items and operations mask
|
|
327
|
+
* @param options - An object of options. Accepts delay which,
|
|
328
|
+
* if specified, is the time to wait between `dragover` and `drop` in milliseconds.
|
|
329
|
+
* Defaults to 0.
|
|
330
|
+
*/
|
|
331
|
+
drop(target: Point, data: Protocol.Input.DragData): Promise<void>;
|
|
332
|
+
/**
|
|
333
|
+
* Performs a drag, dragenter, dragover, and drop in sequence.
|
|
334
|
+
* @param target - point to drag from
|
|
335
|
+
* @param target - point to drop on
|
|
336
|
+
* @param options - An object of options. Accepts delay which,
|
|
337
|
+
* if specified, is the time to wait between `dragover` and `drop` in milliseconds.
|
|
338
|
+
* Defaults to 0.
|
|
339
|
+
*/
|
|
340
|
+
dragAndDrop(start: Point, target: Point, options?: {
|
|
341
|
+
delay?: number;
|
|
342
|
+
}): Promise<void>;
|
|
303
343
|
}
|
|
304
344
|
/**
|
|
305
345
|
* The Touchscreen class exposes touchscreen events.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../src/common/Input.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAiC,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../src/common/Input.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAiC,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAMtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,OAAO,CAAa;IAC5B,gBAAgB;IAChB,UAAU,SAAK;IACf,OAAO,CAAC,YAAY,CAAqB;IAEzC,gBAAgB;gBACJ,MAAM,EAAE,UAAU;IAI9B;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,IAAI,CACR,GAAG,EAAE,QAAQ,EACb,OAAO,GAAE;QAAE,IAAI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G;IACG,WAAW,CACf,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,KAAK,EACb,OAAO,GAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAO,GAC/B,OAAO,CAAC,IAAI,CAAC;CAWjB;AAED;;;GAGG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,OAAO,CAAa;IAC5B,OAAO,CAAC,SAAS,CAAW;IAE5B;;OAEG;gBACS,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ;IAKlD;;;;OAIG;IACG,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAa/C"}
|
|
@@ -432,6 +432,82 @@ class Mouse {
|
|
|
432
432
|
pointerType: 'mouse',
|
|
433
433
|
});
|
|
434
434
|
}
|
|
435
|
+
/**
|
|
436
|
+
* Dispatches a `drag` event.
|
|
437
|
+
* @param start - starting point for drag
|
|
438
|
+
* @param target - point to drag to
|
|
439
|
+
*/
|
|
440
|
+
async drag(start, target) {
|
|
441
|
+
const promise = new Promise((resolve) => {
|
|
442
|
+
this._client.once('Input.dragIntercepted', (event) => resolve(event.data));
|
|
443
|
+
});
|
|
444
|
+
await this.move(start.x, start.y);
|
|
445
|
+
await this.down();
|
|
446
|
+
await this.move(target.x, target.y);
|
|
447
|
+
return promise;
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* Dispatches a `dragenter` event.
|
|
451
|
+
* @param target - point for emitting `dragenter` event
|
|
452
|
+
*/
|
|
453
|
+
async dragEnter(target, data) {
|
|
454
|
+
await this._client.send('Input.dispatchDragEvent', {
|
|
455
|
+
type: 'dragEnter',
|
|
456
|
+
x: target.x,
|
|
457
|
+
y: target.y,
|
|
458
|
+
modifiers: this._keyboard._modifiers,
|
|
459
|
+
data,
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Dispatches a `dragover` event.
|
|
464
|
+
* @param target - point for emitting `dragover` event
|
|
465
|
+
*/
|
|
466
|
+
async dragOver(target, data) {
|
|
467
|
+
await this._client.send('Input.dispatchDragEvent', {
|
|
468
|
+
type: 'dragOver',
|
|
469
|
+
x: target.x,
|
|
470
|
+
y: target.y,
|
|
471
|
+
modifiers: this._keyboard._modifiers,
|
|
472
|
+
data,
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* Performs a dragenter, dragover, and drop in sequence.
|
|
477
|
+
* @param target - point to drop on
|
|
478
|
+
* @param data - drag data containing items and operations mask
|
|
479
|
+
* @param options - An object of options. Accepts delay which,
|
|
480
|
+
* if specified, is the time to wait between `dragover` and `drop` in milliseconds.
|
|
481
|
+
* Defaults to 0.
|
|
482
|
+
*/
|
|
483
|
+
async drop(target, data) {
|
|
484
|
+
await this._client.send('Input.dispatchDragEvent', {
|
|
485
|
+
type: 'drop',
|
|
486
|
+
x: target.x,
|
|
487
|
+
y: target.y,
|
|
488
|
+
modifiers: this._keyboard._modifiers,
|
|
489
|
+
data,
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Performs a drag, dragenter, dragover, and drop in sequence.
|
|
494
|
+
* @param target - point to drag from
|
|
495
|
+
* @param target - point to drop on
|
|
496
|
+
* @param options - An object of options. Accepts delay which,
|
|
497
|
+
* if specified, is the time to wait between `dragover` and `drop` in milliseconds.
|
|
498
|
+
* Defaults to 0.
|
|
499
|
+
*/
|
|
500
|
+
async dragAndDrop(start, target, options = {}) {
|
|
501
|
+
const { delay = null } = options;
|
|
502
|
+
const data = await this.drag(start, target);
|
|
503
|
+
await this.dragEnter(target, data);
|
|
504
|
+
await this.dragOver(target, data);
|
|
505
|
+
if (delay) {
|
|
506
|
+
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
507
|
+
}
|
|
508
|
+
await this.drop(target, data);
|
|
509
|
+
await this.up();
|
|
510
|
+
}
|
|
435
511
|
}
|
|
436
512
|
exports.Mouse = Mouse;
|
|
437
513
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../src/common/Input.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,2CAAqC;AAErC,+DAAgF;
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../src/common/Input.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,2CAAqC;AAErC,+DAAgF;AAQhF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAa,QAAQ;IAMnB,gBAAgB;IAChB,YAAY,MAAkB;QAL9B,gBAAgB;QAChB,eAAU,GAAG,CAAC,CAAC;QACP,iBAAY,GAAG,IAAI,GAAG,EAAU,CAAC;QAIvC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,KAAK,CAAC,IAAI,CACR,GAAa,EACb,UAA6B,EAAE,IAAI,EAAE,SAAS,EAAE;QAEhD,MAAM,WAAW,GAAG,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,CAAC;QAEvD,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC3D,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAEtD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;QAC1E,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE;YAChD,IAAI,EAAE,IAAI,CAAC,CA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declare class ElementHandle<ElementType extends Element = Element> extend
|
|
|
237
237
|
*/
|
|
238
238
|
contentFrame(): Promise<Frame | null>;
|
|
239
239
|
private _scrollIntoViewIfNeeded;
|
|
240
|
-
|
|
240
|
+
/**
|
|
241
|
+
* Returns the middle point within an element unless a specific offset is provided.
|
|
242
|
+
*/
|
|
243
|
+
clickablePoint(offset?: Offset): Promise<Point>;
|
|
241
244
|
private _getBoxModel;
|
|
242
245
|
private _fromProtocolQuad;
|
|
243
246
|
private _intersectQuadWithViewport;
|
|
@@ -253,6 +256,28 @@ export declare class ElementHandle<ElementType extends Element = Element> extend
|
|
|
253
256
|
* If the element is detached from DOM, the method throws an error.
|
|
254
257
|
*/
|
|
255
258
|
click(options?: ClickOptions): Promise<void>;
|
|
259
|
+
/**
|
|
260
|
+
* This method creates and captures a dragevent from the element.
|
|
261
|
+
*/
|
|
262
|
+
drag(target: Point): Promise<Protocol.Input.DragData>;
|
|
263
|
+
/**
|
|
264
|
+
* This method creates a `dragenter` event on the element.
|
|
265
|
+
*/
|
|
266
|
+
dragEnter(data?: Protocol.Input.DragData): Promise<void>;
|
|
267
|
+
/**
|
|
268
|
+
* This method creates a `dragover` event on the element.
|
|
269
|
+
*/
|
|
270
|
+
dragOver(data?: Protocol.Input.DragData): Promise<void>;
|
|
271
|
+
/**
|
|
272
|
+
* This method triggers a drop on the element.
|
|
273
|
+
*/
|
|
274
|
+
drop(data?: Protocol.Input.DragData): Promise<void>;
|
|
275
|
+
/**
|
|
276
|
+
* This method triggers a dragenter, dragover, and drop on the element.
|
|
277
|
+
*/
|
|
278
|
+
dragAndDrop(target: ElementHandle, options?: {
|
|
279
|
+
delay: number;
|
|
280
|
+
}): Promise<void>;
|
|
256
281
|
/**
|
|
257
282
|
* Triggers a `change` and `input` event once all the provided options have been
|
|
258
283
|
* selected. If there's no `<select>` element matching `selector`, the method
|
|
@@ -405,7 +430,22 @@ export declare class ElementHandle<ElementType extends Element = Element> extend
|
|
|
405
430
|
/**
|
|
406
431
|
* Resolves to true if the element is visible in the current viewport.
|
|
407
432
|
*/
|
|
408
|
-
isIntersectingViewport(
|
|
433
|
+
isIntersectingViewport(options?: {
|
|
434
|
+
threshold?: number;
|
|
435
|
+
}): Promise<boolean>;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* @public
|
|
439
|
+
*/
|
|
440
|
+
export interface Offset {
|
|
441
|
+
/**
|
|
442
|
+
* x-offset for the clickable point relative to the top-left corder of the border box.
|
|
443
|
+
*/
|
|
444
|
+
x: number;
|
|
445
|
+
/**
|
|
446
|
+
* y-offset for the clickable point relative to the top-left corder of the border box.
|
|
447
|
+
*/
|
|
448
|
+
y: number;
|
|
409
449
|
}
|
|
410
450
|
/**
|
|
411
451
|
* @public
|
|
@@ -425,6 +465,10 @@ export interface ClickOptions {
|
|
|
425
465
|
* @defaultValue 1
|
|
426
466
|
*/
|
|
427
467
|
clickCount?: number;
|
|
468
|
+
/**
|
|
469
|
+
* Offset for the clickable point relative to the top-left corder of the border box.
|
|
470
|
+
*/
|
|
471
|
+
offset?: Offset;
|
|
428
472
|
}
|
|
429
473
|
/**
|
|
430
474
|
* @public
|
|
@@ -439,4 +483,11 @@ export interface PressOptions {
|
|
|
439
483
|
*/
|
|
440
484
|
text?: string;
|
|
441
485
|
}
|
|
486
|
+
/**
|
|
487
|
+
* @public
|
|
488
|
+
*/
|
|
489
|
+
export interface Point {
|
|
490
|
+
x: number;
|
|
491
|
+
y: number;
|
|
492
|
+
}
|
|
442
493
|
//# sourceMappingURL=JSHandle.d.ts.map
|