chrome-devtools-frontend 1.0.1545096 → 1.0.1547571
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 +5 -1
- package/docs/contributing/infrastructure.md +2 -2
- package/docs/styleguide/ux/styles.md +1 -1
- package/eslint.config.mjs +2 -1
- package/front_end/Images/generate-css-vars.js +1 -1
- package/front_end/Images/src/arrow-down.svg +8 -1
- package/front_end/Images/src/arrow-up.svg +8 -1
- package/front_end/core/common/common.ts +0 -2
- package/front_end/core/host/AidaClient.ts +1 -1
- package/front_end/core/host/InspectorFrontendHostAPI.ts +0 -1
- package/front_end/core/host/UserMetrics.ts +0 -5
- package/front_end/core/i18n/collect-ui-strings.js +1 -1
- package/front_end/core/i18n/generate-locales-js.js +1 -1
- package/front_end/core/platform/HostRuntime.ts +25 -0
- package/front_end/core/platform/KeyboardUtilities.ts +2 -2
- package/front_end/core/platform/StringUtilities.ts +1 -1
- package/front_end/core/platform/api/HostRuntime.ts +45 -0
- package/front_end/core/platform/api/api.ts +7 -0
- package/front_end/core/{common/Worker.ts → platform/browser/HostRuntime.ts} +27 -12
- package/front_end/core/platform/browser/browser.ts +7 -0
- package/front_end/core/platform/node/HostRuntime.ts +85 -0
- package/front_end/core/platform/node/node.ts +7 -0
- package/front_end/core/platform/platform.ts +2 -2
- package/front_end/core/sdk/AnimationModel.ts +1 -1
- package/front_end/core/sdk/CSSModel.ts +1 -1
- package/front_end/core/sdk/CSSProperty.ts +1 -1
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +1 -1
- package/front_end/core/sdk/ConsoleModel.ts +1 -1
- package/front_end/core/sdk/Cookie.ts +1 -1
- package/front_end/core/sdk/DOMModel.ts +2 -2
- package/front_end/core/sdk/DebuggerModel.ts +1 -1
- package/front_end/core/sdk/NetworkManager.ts +6 -0
- package/front_end/core/sdk/PreloadingModel.ts +1 -1
- package/front_end/core/sdk/RemoteObject.ts +1 -1
- package/front_end/core/sdk/ResourceTreeModel.ts +1 -1
- package/front_end/core/sdk/Script.ts +4 -4
- package/front_end/core/sdk/SourceMapScopesInfo.ts +141 -23
- package/front_end/core/sdk/Target.ts +5 -14
- package/front_end/core/sdk/TargetManager.ts +26 -4
- package/front_end/core/sdk/sdk-meta.ts +62 -0
- package/front_end/devtools_compatibility.js +0 -1
- package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +2 -2
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +15 -18
- package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +8 -5
- package/front_end/entrypoints/main/ExecutionContextSelector.ts +1 -1
- package/front_end/entrypoints/main/MainImpl.ts +4 -4
- package/front_end/foundation/Universe.ts +2 -2
- package/front_end/generated/Deprecation.ts +26 -0
- package/front_end/generated/InspectorBackendCommands.ts +5 -4
- package/front_end/generated/SupportedCSSProperties.js +17 -15
- package/front_end/generated/protocol-mapping.d.ts +2 -0
- package/front_end/generated/protocol-proxy-api.d.ts +4 -0
- package/front_end/generated/protocol.ts +19 -29
- package/front_end/models/ai_assistance/AiConversation.ts +268 -0
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +1 -172
- package/front_end/models/ai_assistance/BuiltInAi.ts +131 -134
- package/front_end/models/ai_assistance/ChangeManager.ts +9 -0
- package/front_end/models/ai_assistance/ConversationHandler.ts +27 -52
- package/front_end/models/ai_assistance/agents/AiAgent.ts +9 -8
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +6 -2
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +3 -19
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +313 -313
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +8 -6
- package/front_end/models/ai_assistance/performance/AICallTree.snapshot.txt +33 -33
- package/front_end/models/ai_assistance/performance/AICallTree.ts +9 -3
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +5 -3
- package/front_end/models/bindings/SASSSourceMapping.ts +6 -4
- package/front_end/models/cpu_profile/CPUProfileDataModel.ts +10 -7
- package/front_end/models/crux-manager/CrUXManager.ts +7 -4
- package/front_end/models/formatter/FormatterWorkerPool.ts +9 -7
- package/front_end/models/har/Importer.ts +1 -1
- package/front_end/models/issues_manager/ContrastCheckTrigger.ts +1 -1
- package/front_end/models/issues_manager/GenericIssue.ts +12 -9
- package/front_end/models/javascript_metadata/NativeFunctions.js +4 -0
- package/front_end/models/persistence/AutomaticFileSystemManager.ts +1 -1
- package/front_end/models/trace/handlers/SamplesHandler.ts +3 -0
- package/front_end/models/trace/helpers/Trace.ts +13 -0
- package/front_end/models/trace/types/TraceEvents.ts +2 -1
- package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +29 -0
- package/front_end/models/workspace/IgnoreListManager.ts +1 -2
- package/front_end/models/workspace/UISourceCode.ts +50 -0
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +86 -159
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +8 -0
- package/front_end/panels/ai_assistance/components/ChatView.ts +56 -33
- package/front_end/panels/animation/AnimationTimeline.ts +0 -8
- package/front_end/panels/application/ExtensionStorageModel.ts +1 -1
- package/front_end/panels/application/FrameDetailsView.ts +64 -36
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +1 -1
- package/front_end/panels/application/components/components.ts +0 -2
- package/front_end/panels/common/AiCodeGenerationTeaser.ts +80 -0
- package/front_end/panels/common/common.ts +2 -1
- package/front_end/panels/console/ConsoleInsightTeaser.ts +166 -100
- package/front_end/panels/console/ConsolePrompt.ts +4 -2
- package/front_end/panels/console/ConsoleViewMessage.ts +77 -29
- package/front_end/panels/console/ConsoleViewport.ts +2 -3
- package/front_end/panels/console/consoleInsightTeaser.css +1 -0
- package/front_end/panels/coverage/CoverageModel.ts +2 -2
- package/front_end/panels/elements/ElementIssueUtils.ts +2 -2
- package/front_end/panels/elements/ElementsPanel.ts +1 -1
- package/front_end/panels/elements/ElementsTreeOutline.ts +17 -7
- package/front_end/panels/elements/NodeStackTraceWidget.ts +6 -5
- package/front_end/panels/elements/StylePropertyTreeElement.ts +24 -21
- package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
- package/front_end/panels/elements/cssValueTraceView.css +1 -1
- package/front_end/panels/elements/elements-meta.ts +1 -0
- package/front_end/panels/explain/components/ConsoleInsight.ts +44 -57
- package/front_end/panels/explain/components/consoleInsight.css +46 -1
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +1 -2
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +19 -0
- package/front_end/panels/network/RequestConditionsDrawer.ts +116 -42
- package/front_end/panels/network/networkLogView.css +11 -0
- package/front_end/panels/network/networkTimingTable.css +8 -6
- package/front_end/panels/network/requestConditionsDrawer.css +10 -1
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotProxy.ts +15 -14
- package/front_end/panels/profiler/ProfilesPanel.ts +1 -2
- package/front_end/panels/recorder/components/StepEditor.ts +1 -1
- package/front_end/panels/security/SecurityPanelSidebar.ts +1 -3
- package/front_end/panels/settings/KeybindsSettingsTab.ts +21 -22
- package/front_end/panels/sources/CSSPlugin.ts +1 -1
- package/front_end/panels/sources/CoveragePlugin.ts +5 -5
- package/front_end/panels/sources/DebuggerPlugin.ts +2 -2
- package/front_end/panels/sources/NavigatorView.ts +1 -1
- package/front_end/panels/sources/Plugin.ts +1 -1
- package/front_end/panels/sources/ProfilePlugin.ts +22 -14
- package/front_end/panels/sources/SourcesSearchScope.ts +1 -1
- package/front_end/panels/sources/UISourceCodeFrame.ts +2 -1
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +10 -2
- package/front_end/panels/sources/sources-meta.ts +0 -62
- package/front_end/panels/timeline/README.md +1 -9
- package/front_end/panels/timeline/ThreadAppender.ts +0 -7
- package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -1
- package/front_end/panels/timeline/TimelinePanel.ts +8 -8
- package/front_end/panels/timeline/TimelineUIUtils.ts +5 -1
- package/front_end/panels/timeline/components/ExportTraceOptions.ts +15 -1
- package/front_end/panels/timeline/components/LiveMetricsView.ts +37 -1
- package/front_end/panels/timeline/components/exportTraceOptions.css +11 -2
- package/front_end/panels/timeline/enable-easter-egg.js +1 -1
- package/front_end/panels/timeline/utils/Treemap.ts +1 -1
- 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/cjs/puppeteer/api/DeviceRequestPrompt.d.ts +66 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js +57 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js +1 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +0 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +18 -23
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +16 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts +4 -62
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js +9 -73
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts +8 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js +11 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +9 -10
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +80 -81
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts +66 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js +52 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js +1 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +0 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +18 -23
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +16 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts +4 -62
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js +6 -69
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts +8 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js +11 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +9 -10
- package/front_end/third_party/puppeteer/package/package.json +3 -3
- package/front_end/third_party/puppeteer/package/src/api/DeviceRequestPrompt.ts +79 -0
- package/front_end/third_party/puppeteer/package/src/api/Frame.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/api/api.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +1 -9
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +21 -31
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +18 -0
- package/front_end/third_party/puppeteer/package/src/cdp/DeviceRequestPrompt.ts +6 -72
- package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +2 -4
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +7 -2
- package/front_end/third_party/puppeteer/package/src/common/ConsoleMessage.ts +14 -0
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +1 -0
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +5 -0
- package/front_end/ui/components/text_editor/javascript.ts +1 -1
- package/front_end/ui/legacy/ARIAUtils.ts +2 -2
- package/front_end/ui/legacy/ActionRegistration.ts +11 -0
- package/front_end/ui/legacy/ListWidget.ts +51 -18
- package/front_end/ui/legacy/ReportView.ts +1 -1
- package/front_end/ui/legacy/SoftDropDown.ts +2 -2
- package/front_end/ui/legacy/TabbedPane.ts +3 -3
- package/front_end/ui/legacy/TextPrompt.ts +3 -2
- package/front_end/ui/legacy/Treeoutline.ts +3 -2
- package/front_end/ui/legacy/UIUtils.ts +11 -10
- package/front_end/ui/legacy/Widget.ts +3 -2
- package/front_end/ui/legacy/components/color_picker/ContrastInfo.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +5 -4
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +87 -111
- package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +62 -39
- package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +2 -2
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +3 -9
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +41 -13
- package/front_end/ui/legacy/components/utils/jsUtils.css +28 -0
- package/front_end/ui/legacy/inspectorCommon.css +2 -2
- package/front_end/ui/legacy/legacy.ts +2 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
- package/front_end/ui/visual_logging/LoggingConfig.ts +2 -1
- package/inspector_overlay/tool_window_controls.ts +4 -1
- package/mcp/mcp.ts +1 -1
- package/package.json +2 -3
- package/front_end/panels/application/components/StackTrace.ts +0 -239
- package/front_end/panels/application/components/stackTraceLinkButton.css +0 -16
- package/front_end/panels/application/components/stackTraceRow.css +0 -50
- package/front_end/panels/explain/components/consoleInsightSourcesList.css +0 -51
- package/front_end/ui/components/docs/README.md +0 -6
- package/front_end/ui/components/docs/building-ui-documentation/ComponentEvents.md +0 -54
- package/front_end/ui/components/docs/building-ui-documentation/ComponentPerformance.md +0 -136
- package/front_end/ui/components/docs/building-ui-documentation/CreatingComponents.md +0 -242
- package/front_end/ui/components/docs/building-ui-documentation/README.md +0 -23
- package/front_end/ui/components/docs/building-ui-documentation/StylingComponents.md +0 -66
- package/front_end/ui/components/docs/building-ui-documentation/TestingComponents.md +0 -111
- package/front_end/ui/components/docs/component_docs.ts +0 -24
- package/front_end/ui/components/docs/component_docs_styles.css +0 -53
- package/front_end/ui/components/docs/create_breadcrumbs.ts +0 -44
- package/front_end/ui/components/docs/slider/basic.html +0 -20
- package/front_end/ui/components/docs/switch/basic.html +0 -20
- /package/front_end/models/issues_manager/descriptions/{genericFormAriaLabelledByToNonExistingId.md → genericFormAriaLabelledByToNonExistingIdError.md} +0 -0
- /package/front_end/models/issues_manager/descriptions/{genericFormLabelHasNeitherForNorNestedInput.md → genericFormLabelHasNeitherForNorNestedInputError.md} +0 -0
- /package/front_end/{core/platform → ui/legacy}/DOMUtilities.ts +0 -0
package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConsoleMessage.js","sourceRoot":"","sources":["../../../../src/common/ConsoleMessage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"ConsoleMessage.js","sourceRoot":"","sources":["../../../../src/common/ConsoleMessage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAoDH;;;GAGG;AACH,MAAM,OAAO,cAAc;IACzB,KAAK,CAAqB;IAC1B,KAAK,CAAS;IACd,KAAK,CAAa;IAClB,oBAAoB,CAA2B;IAC/C,MAAM,CAAS;IACf,cAAc,CAA+B;IAE7C;;OAEG;IACH,YACE,IAAwB,EACxB,IAAY,EACZ,IAAgB,EAChB,mBAA6C,EAC7C,KAAa,EACb,aAA2C;QAE3C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,oBAAoB,GAAG,mBAAmB,CAAC;QAChD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;IACtC,CAAC;IAED;;OAEG;IACH,IAAI;QACF,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;OAEG;IACH,IAAI;QACF,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;OAEG;IACH,IAAI;QACF,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,OAAO,CACL,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC;YAC5B,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAC9C,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,UAAU;QACR,OAAO,IAAI,CAAC,oBAAoB,CAAC;IACnC,CAAC;IAED;;;;OAIG;IACH,cAAc;QACZ,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;CACF"}
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
9
9
|
export declare const PUPPETEER_REVISIONS: Readonly<{
|
|
10
|
-
chrome: "142.0.7444.
|
|
11
|
-
'chrome-headless-shell': "142.0.7444.
|
|
12
|
-
firefox: "stable_145.0";
|
|
10
|
+
chrome: "142.0.7444.175";
|
|
11
|
+
'chrome-headless-shell': "142.0.7444.175";
|
|
12
|
+
firefox: "stable_145.0.1";
|
|
13
13
|
}>;
|
|
14
14
|
//# sourceMappingURL=revisions.d.ts.map
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
9
9
|
export const PUPPETEER_REVISIONS = Object.freeze({
|
|
10
|
-
chrome: '142.0.7444.
|
|
11
|
-
'chrome-headless-shell': '142.0.7444.
|
|
12
|
-
firefox: 'stable_145.0',
|
|
10
|
+
chrome: '142.0.7444.175',
|
|
11
|
+
'chrome-headless-shell': '142.0.7444.175',
|
|
12
|
+
firefox: 'stable_145.0.1',
|
|
13
13
|
});
|
|
14
14
|
//# sourceMappingURL=revisions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revisions.js","sourceRoot":"","sources":["../../../src/revisions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,gBAAgB;IACxB,uBAAuB,EAAE,gBAAgB;IACzC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"revisions.js","sourceRoot":"","sources":["../../../src/revisions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,gBAAgB;IACxB,uBAAuB,EAAE,gBAAgB;IACzC,OAAO,EAAE,gBAAgB;CAC1B,CAAC,CAAC"}
|
|
@@ -1151,6 +1151,7 @@ export declare class ConsoleMessage {
|
|
|
1151
1151
|
* The array of locations on the stack of the console message.
|
|
1152
1152
|
*/
|
|
1153
1153
|
stackTrace(): ConsoleMessageLocation[];
|
|
1154
|
+
|
|
1154
1155
|
}
|
|
1155
1156
|
|
|
1156
1157
|
/**
|
|
@@ -1671,25 +1672,23 @@ export declare interface Device {
|
|
|
1671
1672
|
*
|
|
1672
1673
|
* @public
|
|
1673
1674
|
*/
|
|
1674
|
-
export declare class DeviceRequestPrompt {
|
|
1675
|
-
#private;
|
|
1675
|
+
export declare abstract class DeviceRequestPrompt {
|
|
1676
1676
|
/**
|
|
1677
1677
|
* Current list of selectable devices.
|
|
1678
1678
|
*/
|
|
1679
|
-
devices: DeviceRequestPromptDevice[];
|
|
1680
|
-
|
|
1679
|
+
abstract get devices(): DeviceRequestPromptDevice[];
|
|
1681
1680
|
/**
|
|
1682
1681
|
* Resolve to the first device in the prompt matching a filter.
|
|
1683
1682
|
*/
|
|
1684
|
-
waitForDevice(filter: (device: DeviceRequestPromptDevice) => boolean, options?: WaitTimeoutOptions): Promise<DeviceRequestPromptDevice>;
|
|
1683
|
+
abstract waitForDevice(filter: (device: DeviceRequestPromptDevice) => boolean, options?: WaitTimeoutOptions): Promise<DeviceRequestPromptDevice>;
|
|
1685
1684
|
/**
|
|
1686
1685
|
* Select a device in the prompt's list.
|
|
1687
1686
|
*/
|
|
1688
|
-
select(device: DeviceRequestPromptDevice): Promise<void>;
|
|
1687
|
+
abstract select(device: DeviceRequestPromptDevice): Promise<void>;
|
|
1689
1688
|
/**
|
|
1690
1689
|
* Cancel the prompt.
|
|
1691
1690
|
*/
|
|
1692
|
-
cancel(): Promise<void>;
|
|
1691
|
+
abstract cancel(): Promise<void>;
|
|
1693
1692
|
}
|
|
1694
1693
|
|
|
1695
1694
|
/**
|
|
@@ -6925,6 +6924,8 @@ declare namespace Puppeteer_2 {
|
|
|
6925
6924
|
CDPSessionEvents,
|
|
6926
6925
|
CommandOptions,
|
|
6927
6926
|
CDPSession,
|
|
6927
|
+
DeviceRequestPromptDevice,
|
|
6928
|
+
DeviceRequestPrompt,
|
|
6928
6929
|
Dialog,
|
|
6929
6930
|
Quad,
|
|
6930
6931
|
BoxModel,
|
|
@@ -7008,8 +7009,6 @@ declare namespace Puppeteer_2 {
|
|
|
7008
7009
|
Coverage,
|
|
7009
7010
|
JSCoverage,
|
|
7010
7011
|
CSSCoverage,
|
|
7011
|
-
DeviceRequestPromptDevice,
|
|
7012
|
-
DeviceRequestPrompt,
|
|
7013
7012
|
ExtensionTransport,
|
|
7014
7013
|
PuppeteerLifeCycleEvent,
|
|
7015
7014
|
ProtocolLifeCycleEvent,
|
|
@@ -7485,7 +7484,7 @@ export declare interface ScreenshotOptions {
|
|
|
7485
7484
|
* relative to current working directory. If no path is provided, the image
|
|
7486
7485
|
* won't be saved to the disk.
|
|
7487
7486
|
*/
|
|
7488
|
-
path?:
|
|
7487
|
+
path?: string;
|
|
7489
7488
|
/**
|
|
7490
7489
|
* Specifies the region of the page/element to clip.
|
|
7491
7490
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "puppeteer-core",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.31.0",
|
|
4
4
|
"description": "A high-level API to control headless Chrome over the DevTools Protocol",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"puppeteer",
|
|
@@ -154,11 +154,11 @@
|
|
|
154
154
|
"debug": "^4.4.3",
|
|
155
155
|
"devtools-protocol": "0.0.1521046",
|
|
156
156
|
"typed-query-selector": "^2.12.0",
|
|
157
|
-
"webdriver-bidi-protocol": "0.3.
|
|
157
|
+
"webdriver-bidi-protocol": "0.3.9",
|
|
158
158
|
"ws": "^8.18.3"
|
|
159
159
|
},
|
|
160
160
|
"devDependencies": {
|
|
161
|
-
"@types/chrome": "0.1.
|
|
161
|
+
"@types/chrome": "0.1.30",
|
|
162
162
|
"@types/debug": "4.1.12",
|
|
163
163
|
"@types/node": "^18.17.15",
|
|
164
164
|
"@types/ws": "8.18.1",
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google Inc.
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type {WaitTimeoutOptions} from './Page.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Device in a request prompt.
|
|
11
|
+
*
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export class DeviceRequestPromptDevice {
|
|
15
|
+
/**
|
|
16
|
+
* Device id during a prompt.
|
|
17
|
+
*/
|
|
18
|
+
id: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Device name as it appears in a prompt.
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
constructor(id: string, name: string) {
|
|
29
|
+
this.id = id;
|
|
30
|
+
this.name = name;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Device request prompts let you respond to the page requesting for a device
|
|
36
|
+
* through an API like WebBluetooth.
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* `DeviceRequestPrompt` instances are returned via the
|
|
40
|
+
* {@link Page.waitForDevicePrompt} method.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
*
|
|
44
|
+
* ```ts
|
|
45
|
+
* const [devicePrompt] = Promise.all([
|
|
46
|
+
* page.waitForDevicePrompt(),
|
|
47
|
+
* page.click('#connect-bluetooth'),
|
|
48
|
+
* ]);
|
|
49
|
+
* await devicePrompt.select(
|
|
50
|
+
* await devicePrompt.waitForDevice(({name}) => name.includes('My Device')),
|
|
51
|
+
* );
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
export abstract class DeviceRequestPrompt {
|
|
57
|
+
/**
|
|
58
|
+
* Current list of selectable devices.
|
|
59
|
+
*/
|
|
60
|
+
abstract get devices(): DeviceRequestPromptDevice[];
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Resolve to the first device in the prompt matching a filter.
|
|
64
|
+
*/
|
|
65
|
+
abstract waitForDevice(
|
|
66
|
+
filter: (device: DeviceRequestPromptDevice) => boolean,
|
|
67
|
+
options?: WaitTimeoutOptions,
|
|
68
|
+
): Promise<DeviceRequestPromptDevice>;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Select a device in the prompt's list.
|
|
72
|
+
*/
|
|
73
|
+
abstract select(device: DeviceRequestPromptDevice): Promise<void>;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Cancel the prompt.
|
|
77
|
+
*/
|
|
78
|
+
abstract cancel(): Promise<void>;
|
|
79
|
+
}
|
|
@@ -15,7 +15,6 @@ import type {
|
|
|
15
15
|
WaitTimeoutOptions,
|
|
16
16
|
} from '../api/Page.js';
|
|
17
17
|
import type {Accessibility} from '../cdp/Accessibility.js';
|
|
18
|
-
import type {DeviceRequestPrompt} from '../cdp/DeviceRequestPrompt.js';
|
|
19
18
|
import type {PuppeteerLifeCycleEvent} from '../cdp/LifecycleWatcher.js';
|
|
20
19
|
import {EventEmitter, type EventType} from '../common/EventEmitter.js';
|
|
21
20
|
import {getQueryHandlerAndSelector} from '../common/GetQueryHandler.js';
|
|
@@ -33,6 +32,7 @@ import {assert} from '../util/assert.js';
|
|
|
33
32
|
import {throwIfDisposed} from '../util/decorators.js';
|
|
34
33
|
|
|
35
34
|
import type {CDPSession} from './CDPSession.js';
|
|
35
|
+
import type {DeviceRequestPrompt} from './DeviceRequestPrompt.js';
|
|
36
36
|
import type {KeyboardTypeOptions} from './Input.js';
|
|
37
37
|
import {
|
|
38
38
|
FunctionLocator,
|
|
@@ -32,7 +32,6 @@ import type {HTTPRequest} from '../api/HTTPRequest.js';
|
|
|
32
32
|
import type {HTTPResponse} from '../api/HTTPResponse.js';
|
|
33
33
|
import type {Accessibility} from '../cdp/Accessibility.js';
|
|
34
34
|
import type {Coverage} from '../cdp/Coverage.js';
|
|
35
|
-
import type {DeviceRequestPrompt} from '../cdp/DeviceRequestPrompt.js';
|
|
36
35
|
import type {NetworkConditions} from '../cdp/NetworkManager.js';
|
|
37
36
|
import type {Tracing} from '../cdp/Tracing.js';
|
|
38
37
|
import type {ConsoleMessage} from '../common/ConsoleMessage.js';
|
|
@@ -85,6 +84,7 @@ import {stringToTypedArray} from '../util/encoding.js';
|
|
|
85
84
|
import type {Browser} from './Browser.js';
|
|
86
85
|
import type {BrowserContext} from './BrowserContext.js';
|
|
87
86
|
import type {CDPSession} from './CDPSession.js';
|
|
87
|
+
import type {DeviceRequestPrompt} from './DeviceRequestPrompt.js';
|
|
88
88
|
import type {Dialog} from './Dialog.js';
|
|
89
89
|
import type {
|
|
90
90
|
BoundingBox,
|
|
@@ -306,7 +306,7 @@ export interface ScreenshotOptions {
|
|
|
306
306
|
* relative to current working directory. If no path is provided, the image
|
|
307
307
|
* won't be saved to the disk.
|
|
308
308
|
*/
|
|
309
|
-
path?:
|
|
309
|
+
path?: string;
|
|
310
310
|
/**
|
|
311
311
|
* Specifies the region of the page/element to clip.
|
|
312
312
|
*/
|
|
@@ -166,20 +166,13 @@ export class BidiHTTPRequest extends HTTPRequest {
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
get #hasInternalHeaderOverwrite(): boolean {
|
|
169
|
-
return Boolean(
|
|
170
|
-
Object.keys(this.#extraHTTPHeaders).length ||
|
|
171
|
-
Object.keys(this.#userAgentHeaders).length,
|
|
172
|
-
);
|
|
169
|
+
return Boolean(Object.keys(this.#extraHTTPHeaders).length);
|
|
173
170
|
}
|
|
174
171
|
|
|
175
172
|
get #extraHTTPHeaders(): Record<string, string> {
|
|
176
173
|
return this.#frame?.page()._extraHTTPHeaders ?? {};
|
|
177
174
|
}
|
|
178
175
|
|
|
179
|
-
get #userAgentHeaders(): Record<string, string> {
|
|
180
|
-
return this.#frame?.page()._userAgentHeaders ?? {};
|
|
181
|
-
}
|
|
182
|
-
|
|
183
176
|
override headers(): Record<string, string> {
|
|
184
177
|
// Callers should not be allowed to mutate internal structure.
|
|
185
178
|
const headers: Record<string, string> = {};
|
|
@@ -189,7 +182,6 @@ export class BidiHTTPRequest extends HTTPRequest {
|
|
|
189
182
|
return {
|
|
190
183
|
...headers,
|
|
191
184
|
...this.#extraHTTPHeaders,
|
|
192
|
-
...this.#userAgentHeaders,
|
|
193
185
|
};
|
|
194
186
|
}
|
|
195
187
|
|
|
@@ -138,9 +138,7 @@ export class BidiPage extends Page {
|
|
|
138
138
|
/**
|
|
139
139
|
* @internal
|
|
140
140
|
*/
|
|
141
|
-
|
|
142
|
-
#userAgentInterception?: string;
|
|
143
|
-
#userAgentPreloadScript?: string;
|
|
141
|
+
#overrideNavigatorPropertiesPreloadScript?: string;
|
|
144
142
|
override async setUserAgent(
|
|
145
143
|
userAgentOrOptions:
|
|
146
144
|
| string
|
|
@@ -186,26 +184,9 @@ export class BidiPage extends Page {
|
|
|
186
184
|
const enable = userAgent !== '';
|
|
187
185
|
userAgent = userAgent ?? (await this.#browserContext.browser().userAgent());
|
|
188
186
|
|
|
189
|
-
this.
|
|
190
|
-
? {
|
|
191
|
-
'User-Agent': userAgent,
|
|
192
|
-
}
|
|
193
|
-
: {};
|
|
194
|
-
|
|
195
|
-
this.#userAgentInterception = await this.#toggleInterception(
|
|
196
|
-
[Bidi.Network.InterceptPhase.BeforeRequestSent],
|
|
197
|
-
this.#userAgentInterception,
|
|
198
|
-
enable,
|
|
199
|
-
);
|
|
187
|
+
await this.#frame.browsingContext.setUserAgent(enable ? userAgent : null);
|
|
200
188
|
|
|
201
|
-
const overrideNavigatorProperties = (
|
|
202
|
-
userAgent: string,
|
|
203
|
-
platform: string | undefined,
|
|
204
|
-
) => {
|
|
205
|
-
Object.defineProperty(navigator, 'userAgent', {
|
|
206
|
-
value: userAgent,
|
|
207
|
-
configurable: true,
|
|
208
|
-
});
|
|
189
|
+
const overrideNavigatorProperties = (platform: string | undefined) => {
|
|
209
190
|
if (platform) {
|
|
210
191
|
Object.defineProperty(navigator, 'platform', {
|
|
211
192
|
value: platform,
|
|
@@ -219,16 +200,15 @@ export class BidiPage extends Page {
|
|
|
219
200
|
frames.push(...frame.childFrames());
|
|
220
201
|
}
|
|
221
202
|
|
|
222
|
-
if (this.#
|
|
203
|
+
if (this.#overrideNavigatorPropertiesPreloadScript) {
|
|
223
204
|
await this.removeScriptToEvaluateOnNewDocument(
|
|
224
|
-
this.#
|
|
205
|
+
this.#overrideNavigatorPropertiesPreloadScript,
|
|
225
206
|
);
|
|
226
207
|
}
|
|
227
208
|
const [evaluateToken] = await Promise.all([
|
|
228
209
|
enable
|
|
229
210
|
? this.evaluateOnNewDocument(
|
|
230
211
|
overrideNavigatorProperties,
|
|
231
|
-
userAgent,
|
|
232
212
|
platform || undefined,
|
|
233
213
|
)
|
|
234
214
|
: undefined,
|
|
@@ -237,12 +217,11 @@ export class BidiPage extends Page {
|
|
|
237
217
|
...frames.map(frame => {
|
|
238
218
|
return frame.evaluate(
|
|
239
219
|
overrideNavigatorProperties,
|
|
240
|
-
userAgent,
|
|
241
220
|
platform || undefined,
|
|
242
221
|
);
|
|
243
222
|
}),
|
|
244
223
|
]);
|
|
245
|
-
this.#
|
|
224
|
+
this.#overrideNavigatorPropertiesPreloadScript = evaluateToken?.identifier;
|
|
246
225
|
}
|
|
247
226
|
|
|
248
227
|
override async setBypassCSP(enabled: boolean): Promise<void> {
|
|
@@ -746,8 +725,7 @@ export class BidiPage extends Page {
|
|
|
746
725
|
return (
|
|
747
726
|
Boolean(this.#requestInterception) ||
|
|
748
727
|
Boolean(this.#extraHeadersInterception) ||
|
|
749
|
-
Boolean(this.#authInterception)
|
|
750
|
-
Boolean(this.#userAgentInterception)
|
|
728
|
+
Boolean(this.#authInterception)
|
|
751
729
|
);
|
|
752
730
|
}
|
|
753
731
|
|
|
@@ -828,7 +806,7 @@ export class BidiPage extends Page {
|
|
|
828
806
|
|
|
829
807
|
override async setOfflineMode(enabled: boolean): Promise<void> {
|
|
830
808
|
if (!this.#browserContext.browser().cdpSupported) {
|
|
831
|
-
|
|
809
|
+
return await this.#frame.browsingContext.setOfflineMode(enabled);
|
|
832
810
|
}
|
|
833
811
|
|
|
834
812
|
if (!this.#emulatedNetworkConditions) {
|
|
@@ -847,8 +825,20 @@ export class BidiPage extends Page {
|
|
|
847
825
|
networkConditions: NetworkConditions | null,
|
|
848
826
|
): Promise<void> {
|
|
849
827
|
if (!this.#browserContext.browser().cdpSupported) {
|
|
850
|
-
|
|
828
|
+
if (
|
|
829
|
+
!networkConditions?.offline &&
|
|
830
|
+
((networkConditions?.upload ?? -1) >= 0 ||
|
|
831
|
+
(networkConditions?.download ?? -1) >= 0 ||
|
|
832
|
+
(networkConditions?.latency ?? 0) > 0)
|
|
833
|
+
) {
|
|
834
|
+
// WebDriver BiDi supports only offline mode.
|
|
835
|
+
throw new UnsupportedOperation();
|
|
836
|
+
}
|
|
837
|
+
return await this.#frame.browsingContext.setOfflineMode(
|
|
838
|
+
networkConditions?.offline ?? false,
|
|
839
|
+
);
|
|
851
840
|
}
|
|
841
|
+
|
|
852
842
|
if (!this.#emulatedNetworkConditions) {
|
|
853
843
|
this.#emulatedNetworkConditions = {
|
|
854
844
|
offline: networkConditions?.offline ?? false,
|
|
@@ -739,4 +739,22 @@ export class BrowsingContext extends EventEmitter<{
|
|
|
739
739
|
isJavaScriptEnabled(): boolean {
|
|
740
740
|
return this.#emulationState.javaScriptEnabled;
|
|
741
741
|
}
|
|
742
|
+
|
|
743
|
+
async setUserAgent(userAgent: string | null): Promise<void> {
|
|
744
|
+
await this.#session.send('emulation.setUserAgentOverride', {
|
|
745
|
+
userAgent,
|
|
746
|
+
contexts: [this.id],
|
|
747
|
+
});
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
async setOfflineMode(enabled: boolean): Promise<void> {
|
|
751
|
+
await this.#session.send('emulation.setNetworkConditions', {
|
|
752
|
+
networkConditions: enabled
|
|
753
|
+
? {
|
|
754
|
+
type: 'offline',
|
|
755
|
+
}
|
|
756
|
+
: null,
|
|
757
|
+
contexts: [this.id],
|
|
758
|
+
});
|
|
759
|
+
}
|
|
742
760
|
}
|
|
@@ -7,59 +7,17 @@
|
|
|
7
7
|
import type Protocol from 'devtools-protocol';
|
|
8
8
|
|
|
9
9
|
import type {CDPSession} from '../api/CDPSession.js';
|
|
10
|
+
import {DeviceRequestPrompt} from '../api/DeviceRequestPrompt.js';
|
|
11
|
+
import {DeviceRequestPromptDevice} from '../api/DeviceRequestPrompt.js';
|
|
10
12
|
import type {WaitTimeoutOptions} from '../api/Page.js';
|
|
11
13
|
import type {TimeoutSettings} from '../common/TimeoutSettings.js';
|
|
12
14
|
import {assert} from '../util/assert.js';
|
|
13
15
|
import {Deferred} from '../util/Deferred.js';
|
|
14
16
|
|
|
15
17
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
export class DeviceRequestPromptDevice {
|
|
21
|
-
/**
|
|
22
|
-
* Device id during a prompt.
|
|
23
|
-
*/
|
|
24
|
-
id: string;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Device name as it appears in a prompt.
|
|
28
|
-
*/
|
|
29
|
-
name: string;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* @internal
|
|
33
|
-
*/
|
|
34
|
-
constructor(id: string, name: string) {
|
|
35
|
-
this.id = id;
|
|
36
|
-
this.name = name;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Device request prompts let you respond to the page requesting for a device
|
|
42
|
-
* through an API like WebBluetooth.
|
|
43
|
-
*
|
|
44
|
-
* @remarks
|
|
45
|
-
* `DeviceRequestPrompt` instances are returned via the
|
|
46
|
-
* {@link Page.waitForDevicePrompt} method.
|
|
47
|
-
*
|
|
48
|
-
* @example
|
|
49
|
-
*
|
|
50
|
-
* ```ts
|
|
51
|
-
* const [devicePrompt] = Promise.all([
|
|
52
|
-
* page.waitForDevicePrompt(),
|
|
53
|
-
* page.click('#connect-bluetooth'),
|
|
54
|
-
* ]);
|
|
55
|
-
* await devicePrompt.select(
|
|
56
|
-
* await devicePrompt.waitForDevice(({name}) => name.includes('My Device')),
|
|
57
|
-
* );
|
|
58
|
-
* ```
|
|
59
|
-
*
|
|
60
|
-
* @public
|
|
18
|
+
* @internal
|
|
61
19
|
*/
|
|
62
|
-
export class DeviceRequestPrompt {
|
|
20
|
+
export class CdpDeviceRequestPrompt extends DeviceRequestPrompt {
|
|
63
21
|
#client: CDPSession | null;
|
|
64
22
|
#timeoutSettings: TimeoutSettings;
|
|
65
23
|
#id: string;
|
|
@@ -70,19 +28,14 @@ export class DeviceRequestPrompt {
|
|
|
70
28
|
promise: Deferred<DeviceRequestPromptDevice>;
|
|
71
29
|
}>();
|
|
72
30
|
|
|
73
|
-
/**
|
|
74
|
-
* Current list of selectable devices.
|
|
75
|
-
*/
|
|
76
31
|
devices: DeviceRequestPromptDevice[] = [];
|
|
77
32
|
|
|
78
|
-
/**
|
|
79
|
-
* @internal
|
|
80
|
-
*/
|
|
81
33
|
constructor(
|
|
82
34
|
client: CDPSession,
|
|
83
35
|
timeoutSettings: TimeoutSettings,
|
|
84
36
|
firstEvent: Protocol.DeviceAccess.DeviceRequestPromptedEvent,
|
|
85
37
|
) {
|
|
38
|
+
super();
|
|
86
39
|
this.#client = client;
|
|
87
40
|
this.#timeoutSettings = timeoutSettings;
|
|
88
41
|
this.#id = firstEvent.id;
|
|
@@ -126,9 +79,6 @@ export class DeviceRequestPrompt {
|
|
|
126
79
|
}
|
|
127
80
|
}
|
|
128
81
|
|
|
129
|
-
/**
|
|
130
|
-
* Resolve to the first device in the prompt matching a filter.
|
|
131
|
-
*/
|
|
132
82
|
async waitForDevice(
|
|
133
83
|
filter: (device: DeviceRequestPromptDevice) => boolean,
|
|
134
84
|
options: WaitTimeoutOptions = {},
|
|
@@ -164,9 +114,6 @@ export class DeviceRequestPrompt {
|
|
|
164
114
|
}
|
|
165
115
|
}
|
|
166
116
|
|
|
167
|
-
/**
|
|
168
|
-
* Select a device in the prompt's list.
|
|
169
|
-
*/
|
|
170
117
|
async select(device: DeviceRequestPromptDevice): Promise<void> {
|
|
171
118
|
assert(
|
|
172
119
|
this.#client !== null,
|
|
@@ -188,9 +135,6 @@ export class DeviceRequestPrompt {
|
|
|
188
135
|
});
|
|
189
136
|
}
|
|
190
137
|
|
|
191
|
-
/**
|
|
192
|
-
* Cancel the prompt.
|
|
193
|
-
*/
|
|
194
138
|
async cancel(): Promise<void> {
|
|
195
139
|
assert(
|
|
196
140
|
this.#client !== null,
|
|
@@ -217,9 +161,6 @@ export class DeviceRequestPromptManager {
|
|
|
217
161
|
#timeoutSettings: TimeoutSettings;
|
|
218
162
|
#deviceRequestPromptDeferreds = new Set<Deferred<DeviceRequestPrompt>>();
|
|
219
163
|
|
|
220
|
-
/**
|
|
221
|
-
* @internal
|
|
222
|
-
*/
|
|
223
164
|
constructor(client: CDPSession, timeoutSettings: TimeoutSettings) {
|
|
224
165
|
this.#client = client;
|
|
225
166
|
this.#timeoutSettings = timeoutSettings;
|
|
@@ -232,10 +173,6 @@ export class DeviceRequestPromptManager {
|
|
|
232
173
|
});
|
|
233
174
|
}
|
|
234
175
|
|
|
235
|
-
/**
|
|
236
|
-
* Wait for device prompt created by an action like calling WebBluetooth's
|
|
237
|
-
* requestDevice.
|
|
238
|
-
*/
|
|
239
176
|
async waitForDevicePrompt(
|
|
240
177
|
options: WaitTimeoutOptions = {},
|
|
241
178
|
): Promise<DeviceRequestPrompt> {
|
|
@@ -277,9 +214,6 @@ export class DeviceRequestPromptManager {
|
|
|
277
214
|
}
|
|
278
215
|
}
|
|
279
216
|
|
|
280
|
-
/**
|
|
281
|
-
* @internal
|
|
282
|
-
*/
|
|
283
217
|
#onDeviceRequestPrompted(
|
|
284
218
|
event: Protocol.DeviceAccess.DeviceRequestPromptedEvent,
|
|
285
219
|
) {
|
|
@@ -288,7 +222,7 @@ export class DeviceRequestPromptManager {
|
|
|
288
222
|
}
|
|
289
223
|
|
|
290
224
|
assert(this.#client !== null);
|
|
291
|
-
const devicePrompt = new
|
|
225
|
+
const devicePrompt = new CdpDeviceRequestPrompt(
|
|
292
226
|
this.#client,
|
|
293
227
|
this.#timeoutSettings,
|
|
294
228
|
event,
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import type {Protocol} from 'devtools-protocol';
|
|
8
8
|
|
|
9
9
|
import type {CDPSession} from '../api/CDPSession.js';
|
|
10
|
+
import type {DeviceRequestPrompt} from '../api/DeviceRequestPrompt.js';
|
|
10
11
|
import type {ElementHandle} from '../api/ElementHandle.js';
|
|
11
12
|
import type {WaitForOptions} from '../api/Frame.js';
|
|
12
13
|
import {Frame, FrameEvent, throwIfDetached} from '../api/Frame.js';
|
|
@@ -21,10 +22,7 @@ import {isErrorLike} from '../util/ErrorLike.js';
|
|
|
21
22
|
import {Accessibility} from './Accessibility.js';
|
|
22
23
|
import type {Binding} from './Binding.js';
|
|
23
24
|
import type {CdpPreloadScript} from './CdpPreloadScript.js';
|
|
24
|
-
import type {
|
|
25
|
-
DeviceRequestPrompt,
|
|
26
|
-
DeviceRequestPromptManager,
|
|
27
|
-
} from './DeviceRequestPrompt.js';
|
|
25
|
+
import type {DeviceRequestPromptManager} from './DeviceRequestPrompt.js';
|
|
28
26
|
import type {FrameManager} from './FrameManager.js';
|
|
29
27
|
import {FrameManagerEvent} from './FrameManagerEvents.js';
|
|
30
28
|
import type {IsolatedWorldChart} from './IsolatedWorld.js';
|
|
@@ -10,6 +10,7 @@ import {firstValueFrom, from, raceWith} from '../../third_party/rxjs/rxjs.js';
|
|
|
10
10
|
import type {Browser} from '../api/Browser.js';
|
|
11
11
|
import type {BrowserContext} from '../api/BrowserContext.js';
|
|
12
12
|
import {CDPSessionEvent, type CDPSession} from '../api/CDPSession.js';
|
|
13
|
+
import type {DeviceRequestPrompt} from '../api/DeviceRequestPrompt.js';
|
|
13
14
|
import type {ElementHandle} from '../api/ElementHandle.js';
|
|
14
15
|
import type {Frame, WaitForOptions} from '../api/Frame.js';
|
|
15
16
|
import type {HTTPResponse} from '../api/HTTPResponse.js';
|
|
@@ -62,7 +63,6 @@ import type {CdpBrowser} from './Browser.js';
|
|
|
62
63
|
import {CdpCDPSession} from './CdpSession.js';
|
|
63
64
|
import {isTargetClosedError} from './Connection.js';
|
|
64
65
|
import {Coverage} from './Coverage.js';
|
|
65
|
-
import type {DeviceRequestPrompt} from './DeviceRequestPrompt.js';
|
|
66
66
|
import {CdpDialog} from './Dialog.js';
|
|
67
67
|
import {EmulationManager} from './EmulationManager.js';
|
|
68
68
|
import type {CdpFrame} from './Frame.js';
|
|
@@ -488,7 +488,8 @@ export class CdpPage extends Page {
|
|
|
488
488
|
}
|
|
489
489
|
|
|
490
490
|
#onLogEntryAdded(event: Protocol.Log.EntryAddedEvent): void {
|
|
491
|
-
const {level, text, args, source, url, lineNumber} =
|
|
491
|
+
const {level, text, args, source, url, lineNumber, stackTrace} =
|
|
492
|
+
event.entry;
|
|
492
493
|
if (args) {
|
|
493
494
|
args.map(arg => {
|
|
494
495
|
void releaseObject(this.#primaryTargetClient, arg);
|
|
@@ -502,6 +503,8 @@ export class CdpPage extends Page {
|
|
|
502
503
|
text,
|
|
503
504
|
[],
|
|
504
505
|
[{url, lineNumber}],
|
|
506
|
+
undefined,
|
|
507
|
+
stackTrace,
|
|
505
508
|
),
|
|
506
509
|
);
|
|
507
510
|
}
|
|
@@ -891,6 +894,8 @@ export class CdpPage extends Page {
|
|
|
891
894
|
textTokens.join(' '),
|
|
892
895
|
args,
|
|
893
896
|
stackTraceLocations,
|
|
897
|
+
undefined,
|
|
898
|
+
stackTrace,
|
|
894
899
|
);
|
|
895
900
|
this.emit(PageEvent.Console, message);
|
|
896
901
|
}
|