chrome-devtools-frontend 1.0.1538523 → 1.0.1539972
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/eslint.config.mjs +1 -1
- package/front_end/core/common/Debouncer.ts +2 -2
- package/front_end/core/common/Gzip.ts +1 -1
- package/front_end/core/common/Throttler.ts +3 -3
- package/front_end/core/host/GdpClient.ts +4 -0
- package/front_end/core/protocol_client/CDPConnection.ts +12 -10
- package/front_end/core/protocol_client/DevToolsCDPConnection.ts +181 -0
- package/front_end/core/protocol_client/InspectorBackend.ts +55 -249
- package/front_end/core/protocol_client/protocol_client.ts +2 -2
- package/front_end/core/sdk/ChildTargetManager.ts +5 -41
- package/front_end/core/sdk/Connections.ts +9 -58
- package/front_end/core/sdk/DOMModel.ts +1 -0
- package/front_end/core/sdk/DebuggerModel.ts +3 -16
- package/front_end/core/sdk/RehydratingConnection.ts +1 -1
- package/front_end/core/sdk/RemoteObject.ts +4 -0
- package/front_end/core/sdk/Target.ts +3 -6
- package/front_end/core/sdk/TargetManager.ts +1 -2
- package/front_end/entrypoints/lighthouse_worker/LighthouseWorkerService.ts +13 -26
- package/front_end/entrypoints/node_app/{NodeConnectionsPanel.ts → app/NodeConnectionsPanel.ts} +8 -8
- package/front_end/entrypoints/node_app/{NodeMain.ts → app/NodeMain.ts} +12 -11
- package/front_end/entrypoints/node_app/app/app.ts +6 -0
- package/front_end/entrypoints/node_app/node_app.ts +4 -2
- package/front_end/generated/Deprecation.ts +8 -0
- package/front_end/generated/{InspectorBackendCommands.js → InspectorBackendCommands.ts} +18 -36
- package/front_end/generated/SupportedCSSProperties.js +50 -9
- package/front_end/generated/protocol.ts +2 -2
- package/front_end/models/ai_assistance/EvaluateAction.ts +88 -5
- package/front_end/models/ai_assistance/injected.ts +15 -2
- package/front_end/models/live-metrics/web-vitals-injected/README.md +1 -1
- package/front_end/models/trace/Styles.ts +1 -1
- package/front_end/models/trace/handlers/NetworkRequestsHandler.ts +18 -3
- package/front_end/models/trace/types/TraceEvents.ts +19 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +49 -26
- package/front_end/panels/ai_assistance/PatchWidget.ts +22 -12
- package/front_end/panels/ai_assistance/aiAssistancePanel.css +1 -1
- package/front_end/panels/ai_assistance/ai_assistance.ts +1 -0
- package/front_end/panels/ai_assistance/components/ChatView.ts +2 -135
- package/front_end/panels/ai_assistance/components/DisabledWidget.ts +170 -0
- package/front_end/panels/ai_assistance/components/ExploreWidget.ts +4 -4
- package/front_end/panels/ai_assistance/components/chatView.css +0 -31
- package/front_end/panels/ai_assistance/components/disabledWidget.css +45 -0
- package/front_end/panels/animation/AnimationTimeline.ts +1 -1
- package/front_end/panels/application/components/FrameDetailsView.ts +1 -1
- package/front_end/panels/common/AiCodeCompletionDisclaimer.ts +4 -4
- package/front_end/panels/common/AiCodeCompletionSummaryToolbar.ts +2 -2
- package/front_end/panels/console/ConsoleViewMessage.ts +1 -1
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +3 -3
- package/front_end/panels/elements/ElementsTreeElement.ts +123 -95
- package/front_end/panels/elements/ElementsTreeOutline.ts +2 -2
- package/front_end/panels/elements/NodeStackTraceWidget.ts +8 -2
- package/front_end/panels/elements/PropertiesWidget.ts +3 -2
- package/front_end/panels/event_listeners/EventListenersView.ts +9 -5
- package/front_end/panels/explain/components/ConsoleInsight.ts +2 -3
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +57 -33
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorController.ts +2 -2
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts +12 -5
- package/front_end/panels/network/RequestInitiatorView.ts +1 -1
- package/front_end/panels/network/RequestPayloadView.ts +2 -1
- package/front_end/panels/network/RequestTimingView.ts +4 -2
- package/front_end/panels/network/components/EditableSpan.ts +1 -1
- package/front_end/panels/network/components/RequestHeadersView.ts +24 -17
- package/front_end/panels/protocol_monitor/JSONEditor.ts +2 -2
- package/front_end/panels/recorder/RecorderController.ts +6 -7
- package/front_end/panels/recorder/components/StepView.ts +1 -1
- package/front_end/panels/recorder/models/RecordingPlayer.ts +7 -6
- package/front_end/panels/settings/components/SyncSection.ts +1 -1
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +4 -4
- package/front_end/panels/sources/BreakpointsView.ts +3 -3
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +4 -3
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +3 -2
- package/front_end/panels/timeline/TimelineFlameChartView.ts +10 -10
- package/front_end/panels/timeline/TimelinePanel.ts +3 -3
- package/front_end/panels/timeline/TimelineUIUtils.ts +21 -24
- package/front_end/panels/timeline/components/FieldSettingsDialog.ts +9 -5
- package/front_end/panels/timeline/components/LiveMetricsView.ts +20 -9
- package/front_end/panels/timeline/components/MetricCard.ts +4 -2
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +3 -2
- package/front_end/panels/utils/utils.ts +4 -2
- package/front_end/services/puppeteer/PuppeteerConnection.ts +57 -53
- 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/Browser.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js +4 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +5 -0
- 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/bidi/BidiOverCdp.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BidiOverCdp.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BidiOverCdp.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserConnector.js +4 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Connection.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Connection.js +3 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +1 -0
- 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 +29 -9
- 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 +1 -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 +11 -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/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +9 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +21 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js +4 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/CdpSession.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/CdpSession.js +2 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/CdpSession.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Connection.d.ts +6 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Connection.js +11 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExtensionTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExtensionTransport.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExtensionTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +1 -0
- 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 +6 -0
- 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/cdp/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js +29 -27
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/CallbackRegistry.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/CallbackRegistry.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/CallbackRegistry.js +4 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/CallbackRegistry.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +7 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.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/node/BrowserLauncher.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +10 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.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 +14 -3
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +97 -43
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js +4 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +5 -0
- 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/bidi/BidiOverCdp.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BidiOverCdp.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BidiOverCdp.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserConnector.js +4 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Connection.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Connection.js +3 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +1 -0
- 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 +29 -9
- 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 +1 -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 +11 -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/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +9 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +21 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js +4 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/CdpSession.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/CdpSession.js +2 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/CdpSession.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Connection.d.ts +6 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Connection.js +11 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExtensionTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExtensionTransport.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExtensionTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +1 -0
- 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 +6 -0
- 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/cdp/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js +30 -28
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/CallbackRegistry.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/CallbackRegistry.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/CallbackRegistry.js +4 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/CallbackRegistry.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts +7 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +10 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.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 +14 -3
- package/front_end/third_party/puppeteer/package/package.json +3 -3
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +4 -2
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +3 -1
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +6 -0
- package/front_end/third_party/puppeteer/package/src/bidi/BidiOverCdp.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/BrowserConnector.ts +8 -1
- package/front_end/third_party/puppeteer/package/src/bidi/BrowserContext.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/bidi/Connection.ts +4 -1
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +38 -10
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +13 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +8 -2
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +32 -0
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserConnector.ts +4 -0
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserContext.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/cdp/CdpSession.ts +2 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Connection.ts +15 -1
- package/front_end/third_party/puppeteer/package/src/cdp/ExtensionTransport.ts +5 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +8 -0
- package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +36 -43
- package/front_end/third_party/puppeteer/package/src/common/CallbackRegistry.ts +7 -5
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +8 -0
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +22 -1
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/components/dialogs/ButtonDialog.ts +15 -5
- package/front_end/ui/components/expandable_list/ExpandableList.ts +1 -1
- package/front_end/ui/components/helpers/helpers.ts +0 -2
- package/front_end/ui/components/menus/Menu.ts +5 -3
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +1 -1
- package/front_end/ui/components/survey_link/SurveyLink.docs.ts +22 -0
- package/front_end/ui/components/switch/Switch.docs.ts +38 -0
- package/front_end/ui/components/tooltips/Tooltip.ts +69 -45
- package/front_end/ui/components/tree_outline/TreeOutline.ts +1 -2
- package/front_end/ui/legacy/SelectMenu.docs.ts +14 -0
- package/front_end/ui/legacy/Slider.docs.ts +49 -0
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +3 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +453 -347
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +77 -5
- package/front_end/ui/legacy/components/utils/Linkifier.ts +62 -3
- package/front_end/ui/visual_logging/KnownContextValues.ts +8 -0
- package/package.json +1 -1
- package/front_end/core/protocol_client/NodeURL.ts +0 -42
- package/front_end/third_party/puppeteer/package/src/templates/version.ts.tmpl +0 -4
- package/front_end/ui/components/docs/color_swatch/basic.html +0 -32
- package/front_end/ui/components/docs/color_swatch/basic.ts +0 -38
- package/front_end/ui/components/docs/color_swatch/change-color.html +0 -24
- package/front_end/ui/components/docs/color_swatch/change-color.ts +0 -28
- package/front_end/ui/components/docs/combo_box/basic.html +0 -20
- package/front_end/ui/components/docs/combo_box/basic.ts +0 -49
- package/front_end/ui/components/docs/computed_style_property/basic.html +0 -25
- package/front_end/ui/components/docs/computed_style_property/basic.ts +0 -19
- package/front_end/ui/components/docs/computed_style_property/traceable.html +0 -25
- package/front_end/ui/components/docs/computed_style_property/traceable.ts +0 -16
- package/front_end/ui/components/docs/computed_style_trace/basic.html +0 -25
- package/front_end/ui/components/docs/computed_style_trace/basic.ts +0 -24
- package/front_end/ui/components/docs/console_insight/basic.html +0 -28
- package/front_end/ui/components/docs/console_insight/basic.ts +0 -103
- package/front_end/ui/components/docs/console_insight/error.html +0 -28
- package/front_end/ui/components/docs/console_insight/error.ts +0 -33
- package/front_end/ui/components/docs/console_insight/loading.html +0 -28
- package/front_end/ui/components/docs/console_insight/loading.ts +0 -47
- package/front_end/ui/components/docs/elements_breadcrumbs/basic.html +0 -43
- package/front_end/ui/components/docs/elements_breadcrumbs/basic.ts +0 -54
- package/front_end/ui/components/docs/elements_breadcrumbs/helpers.ts +0 -29
- package/front_end/ui/components/docs/elements_breadcrumbs/scroll-to-active-element.html +0 -38
- package/front_end/ui/components/docs/elements_breadcrumbs/scroll-to-active-element.ts +0 -90
- package/front_end/ui/components/docs/elements_breadcrumbs/scroll.html +0 -29
- package/front_end/ui/components/docs/elements_breadcrumbs/scroll.ts +0 -62
- package/front_end/ui/components/docs/icon_button/basic.html +0 -34
- package/front_end/ui/components/docs/icon_button/basic.ts +0 -67
- package/front_end/ui/components/docs/issue_counter/basic.html +0 -35
- package/front_end/ui/components/docs/issue_counter/basic.ts +0 -34
- package/front_end/ui/components/docs/issue_link_icon/basic.html +0 -31
- package/front_end/ui/components/docs/issue_link_icon/basic.ts +0 -26
- package/front_end/ui/components/docs/legacy_color_invert/basic.html +0 -77
- package/front_end/ui/components/docs/legacy_color_invert/basic.ts +0 -98
- package/front_end/ui/components/docs/linear_memory_inspector/basic.html +0 -26
- package/front_end/ui/components/docs/linear_memory_inspector/basic.ts +0 -44
- package/front_end/ui/components/docs/menu/basic.html +0 -28
- package/front_end/ui/components/docs/menu/basic.ts +0 -66
- package/front_end/ui/components/docs/recorder_control_button/basic.html +0 -20
- package/front_end/ui/components/docs/recorder_control_button/basic.ts +0 -15
- package/front_end/ui/components/docs/recorder_recording_list_view/basic.html +0 -20
- package/front_end/ui/components/docs/recorder_recording_list_view/basic.ts +0 -26
- package/front_end/ui/components/docs/recorder_select_button/basic.html +0 -20
- package/front_end/ui/components/docs/recorder_select_button/basic.ts +0 -81
- package/front_end/ui/components/docs/recorder_split_view/basic.html +0 -17
- package/front_end/ui/components/docs/recorder_split_view/basic.ts +0 -22
- package/front_end/ui/components/docs/request_link_icon/basic.html +0 -31
- package/front_end/ui/components/docs/request_link_icon/basic.ts +0 -21
- package/front_end/ui/components/docs/slider/basic.ts +0 -62
- package/front_end/ui/components/docs/style_property_editor/flex.html +0 -21
- package/front_end/ui/components/docs/style_property_editor/flex.ts +0 -52
- package/front_end/ui/components/docs/style_property_editor/grid.html +0 -22
- package/front_end/ui/components/docs/style_property_editor/grid.ts +0 -50
- package/front_end/ui/components/docs/style_property_editor/masonry.html +0 -21
- package/front_end/ui/components/docs/style_property_editor/masonry.ts +0 -50
- package/front_end/ui/components/docs/survey_link/basic.html +0 -20
- package/front_end/ui/components/docs/survey_link/basic.ts +0 -28
- package/front_end/ui/components/docs/switch/basic.ts +0 -51
- package/front_end/ui/components/docs/tree_outline/basic.html +0 -33
- package/front_end/ui/components/docs/tree_outline/basic.ts +0 -38
- package/front_end/ui/components/docs/tree_outline/custom-renderers.html +0 -32
- package/front_end/ui/components/docs/tree_outline/custom-renderers.ts +0 -61
- package/front_end/ui/components/docs/tree_outline/lazy-children.html +0 -32
- package/front_end/ui/components/docs/tree_outline/lazy-children.ts +0 -91
- package/front_end/ui/components/docs/tree_outline/sample-data.ts +0 -67
- package/front_end/ui/components/helpers/directives.ts +0 -38
- /package/front_end/entrypoints/node_app/{nodeConnectionsPanel.css → app/nodeConnectionsPanel.css} +0 -0
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import type {ConnectionTransport} from '../common/ConnectionTransport.js';
|
|
8
8
|
import type {ConnectOptions} from '../common/ConnectOptions.js';
|
|
9
9
|
import {debugError, DEFAULT_VIEWPORT} from '../common/util.js';
|
|
10
|
+
import {createIncrementalIdGenerator} from '../util/incremental-id-generator.js';
|
|
10
11
|
|
|
11
12
|
import {CdpBrowser} from './Browser.js';
|
|
12
13
|
import {Connection} from './Connection.js';
|
|
@@ -32,6 +33,7 @@ export async function _connectToCdpBrowser(
|
|
|
32
33
|
slowMo = 0,
|
|
33
34
|
protocolTimeout,
|
|
34
35
|
handleDevToolsAsPage,
|
|
36
|
+
idGenerator = createIncrementalIdGenerator(),
|
|
35
37
|
} = options;
|
|
36
38
|
|
|
37
39
|
const connection = new Connection(
|
|
@@ -39,6 +41,8 @@ export async function _connectToCdpBrowser(
|
|
|
39
41
|
connectionTransport,
|
|
40
42
|
slowMo,
|
|
41
43
|
protocolTimeout,
|
|
44
|
+
/* rawErrors */ false,
|
|
45
|
+
idGenerator,
|
|
42
46
|
);
|
|
43
47
|
|
|
44
48
|
const {browserContextIds} = await connection.send(
|
|
@@ -45,13 +45,13 @@ export class CdpBrowserContext extends BrowserContext {
|
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
override async pages(): Promise<Page[]> {
|
|
48
|
+
override async pages(includeAll = false): Promise<Page[]> {
|
|
49
49
|
const pages = await Promise.all(
|
|
50
50
|
this.targets()
|
|
51
51
|
.filter(target => {
|
|
52
52
|
return (
|
|
53
53
|
target.type() === 'page' ||
|
|
54
|
-
(target.type() === 'other' &&
|
|
54
|
+
((target.type() === 'other' || includeAll) &&
|
|
55
55
|
this.#browser._getIsPageTargetCallback()?.(target))
|
|
56
56
|
);
|
|
57
57
|
})
|
|
@@ -27,7 +27,7 @@ import type {CdpTarget} from './Target.js';
|
|
|
27
27
|
export class CdpCDPSession extends CDPSession {
|
|
28
28
|
#sessionId: string;
|
|
29
29
|
#targetType: string;
|
|
30
|
-
#callbacks
|
|
30
|
+
#callbacks: CallbackRegistry;
|
|
31
31
|
#connection: Connection;
|
|
32
32
|
#parentSessionId?: string;
|
|
33
33
|
#target?: CdpTarget;
|
|
@@ -46,6 +46,7 @@ export class CdpCDPSession extends CDPSession {
|
|
|
46
46
|
super();
|
|
47
47
|
this.#connection = connection;
|
|
48
48
|
this.#targetType = targetType;
|
|
49
|
+
this.#callbacks = new CallbackRegistry(connection._idGenerator);
|
|
49
50
|
this.#sessionId = sessionId;
|
|
50
51
|
this.#parentSessionId = parentSessionId;
|
|
51
52
|
this.#rawErrors = rawErrors;
|
|
@@ -19,6 +19,10 @@ import {debug} from '../common/Debug.js';
|
|
|
19
19
|
import {ConnectionClosedError, TargetCloseError} from '../common/Errors.js';
|
|
20
20
|
import {EventEmitter} from '../common/EventEmitter.js';
|
|
21
21
|
import {createProtocolErrorMessage} from '../util/ErrorLike.js';
|
|
22
|
+
import {
|
|
23
|
+
createIncrementalIdGenerator,
|
|
24
|
+
type GetIdFn,
|
|
25
|
+
} from '../util/incremental-id-generator.js';
|
|
22
26
|
|
|
23
27
|
import {CdpCDPSession} from './CdpSession.js';
|
|
24
28
|
|
|
@@ -38,6 +42,7 @@ export class Connection extends EventEmitter<CDPSessionEvents> {
|
|
|
38
42
|
#manuallyAttached = new Set<string>();
|
|
39
43
|
#callbacks: CallbackRegistry;
|
|
40
44
|
#rawErrors = false;
|
|
45
|
+
#idGenerator: GetIdFn;
|
|
41
46
|
|
|
42
47
|
constructor(
|
|
43
48
|
url: string,
|
|
@@ -45,10 +50,12 @@ export class Connection extends EventEmitter<CDPSessionEvents> {
|
|
|
45
50
|
delay = 0,
|
|
46
51
|
timeout?: number,
|
|
47
52
|
rawErrors = false,
|
|
53
|
+
idGenerator: () => number = createIncrementalIdGenerator(),
|
|
48
54
|
) {
|
|
49
55
|
super();
|
|
50
56
|
this.#rawErrors = rawErrors;
|
|
51
|
-
this.#
|
|
57
|
+
this.#idGenerator = idGenerator;
|
|
58
|
+
this.#callbacks = new CallbackRegistry(idGenerator);
|
|
52
59
|
this.#url = url;
|
|
53
60
|
this.#delay = delay;
|
|
54
61
|
this.#timeout = timeout ?? 180_000;
|
|
@@ -80,6 +87,13 @@ export class Connection extends EventEmitter<CDPSessionEvents> {
|
|
|
80
87
|
return this.#closed;
|
|
81
88
|
}
|
|
82
89
|
|
|
90
|
+
/**
|
|
91
|
+
* @internal
|
|
92
|
+
*/
|
|
93
|
+
get _idGenerator(): GetIdFn {
|
|
94
|
+
return this.#idGenerator;
|
|
95
|
+
}
|
|
96
|
+
|
|
83
97
|
/**
|
|
84
98
|
* @internal
|
|
85
99
|
*/
|
|
@@ -68,7 +68,10 @@ export class ExtensionTransport implements ConnectionTransport {
|
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
#dispatchResponse(message: object): void {
|
|
71
|
-
|
|
71
|
+
// Dispatch in a new task like other transports.
|
|
72
|
+
setTimeout(() => {
|
|
73
|
+
this.onmessage?.(JSON.stringify(message));
|
|
74
|
+
}, 0);
|
|
72
75
|
}
|
|
73
76
|
|
|
74
77
|
send(message: string): void {
|
|
@@ -125,6 +128,7 @@ export class ExtensionTransport implements ConnectionTransport {
|
|
|
125
128
|
if (parsed.sessionId === 'tabTargetSessionId') {
|
|
126
129
|
this.#dispatchResponse({
|
|
127
130
|
method: 'Target.attachedToTarget',
|
|
131
|
+
sessionId: 'tabTargetSessionId',
|
|
128
132
|
params: {
|
|
129
133
|
targetInfo: pageTargetInfo,
|
|
130
134
|
sessionId: 'pageTargetSessionId',
|
|
@@ -58,6 +58,7 @@ import {AsyncDisposableStack} from '../util/disposable.js';
|
|
|
58
58
|
import {isErrorLike} from '../util/ErrorLike.js';
|
|
59
59
|
|
|
60
60
|
import {Binding} from './Binding.js';
|
|
61
|
+
import type {CdpBrowser} from './Browser.js';
|
|
61
62
|
import {CdpCDPSession} from './CdpSession.js';
|
|
62
63
|
import {isTargetClosedError} from './Connection.js';
|
|
63
64
|
import {Coverage} from './Coverage.js';
|
|
@@ -417,6 +418,13 @@ export class CdpPage extends Page {
|
|
|
417
418
|
return this.#emulationManager.javascriptEnabled;
|
|
418
419
|
}
|
|
419
420
|
|
|
421
|
+
override async openDevTools(): Promise<Page> {
|
|
422
|
+
const pageTargetId = this.target()._targetId;
|
|
423
|
+
const browser = this.browser() as CdpBrowser;
|
|
424
|
+
const devtoolsPage = await browser._createDevToolsPage(pageTargetId);
|
|
425
|
+
return devtoolsPage;
|
|
426
|
+
}
|
|
427
|
+
|
|
420
428
|
override async waitForFileChooser(
|
|
421
429
|
options: WaitTimeoutOptions = {},
|
|
422
430
|
): Promise<FileChooser> {
|
|
@@ -15,7 +15,8 @@ import {Deferred} from '../util/Deferred.js';
|
|
|
15
15
|
|
|
16
16
|
import {CdpCDPSession} from './CdpSession.js';
|
|
17
17
|
import type {Connection} from './Connection.js';
|
|
18
|
-
import {CdpTarget
|
|
18
|
+
import type {CdpTarget} from './Target.js';
|
|
19
|
+
import {InitializationStatus} from './Target.js';
|
|
19
20
|
import type {TargetManagerEvents} from './TargetManageEvents.js';
|
|
20
21
|
import {TargetManagerEvent} from './TargetManageEvents.js';
|
|
21
22
|
|
|
@@ -90,10 +91,20 @@ export class TargetManager
|
|
|
90
91
|
>();
|
|
91
92
|
|
|
92
93
|
#initializeDeferred = Deferred.create<void>();
|
|
93
|
-
#targetsIdsForInit = new Set<string>();
|
|
94
94
|
#waitForInitiallyDiscoveredTargets = true;
|
|
95
95
|
|
|
96
96
|
#discoveryFilter: Protocol.Target.FilterEntry[] = [{}];
|
|
97
|
+
// IDs of tab targets detected while running the initial Target.setAutoAttach
|
|
98
|
+
// request. These are the targets whose initialization we want to await for
|
|
99
|
+
// before resolving puppeteer.connect() or launch() to avoid flakiness.
|
|
100
|
+
// Whenever a sub-target whose parent is a tab target is attached, we remove
|
|
101
|
+
// the tab target from this list. Once the list is empty, we resolve the
|
|
102
|
+
// initializeDeferred.
|
|
103
|
+
#targetsIdsForInit = new Set<string>();
|
|
104
|
+
// This is false until the connection-level Target.setAutoAttach request is
|
|
105
|
+
// done. It indicates whethere we are running the initial auto-attach step or
|
|
106
|
+
// if we are handling targets after that.
|
|
107
|
+
#initialAttachDone = false;
|
|
97
108
|
|
|
98
109
|
constructor(
|
|
99
110
|
connection: Connection,
|
|
@@ -117,45 +128,12 @@ export class TargetManager
|
|
|
117
128
|
this.#setupAttachmentListeners(this.#connection);
|
|
118
129
|
}
|
|
119
130
|
|
|
120
|
-
#storeExistingTargetsForInit = () => {
|
|
121
|
-
if (!this.#waitForInitiallyDiscoveredTargets) {
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
for (const [
|
|
125
|
-
targetId,
|
|
126
|
-
targetInfo,
|
|
127
|
-
] of this.#discoveredTargetsByTargetId.entries()) {
|
|
128
|
-
const targetForFilter = new CdpTarget(
|
|
129
|
-
targetInfo,
|
|
130
|
-
undefined,
|
|
131
|
-
undefined,
|
|
132
|
-
this,
|
|
133
|
-
undefined,
|
|
134
|
-
);
|
|
135
|
-
// Only wait for pages and frames (except those from extensions)
|
|
136
|
-
// to auto-attach.
|
|
137
|
-
const isPageOrFrame =
|
|
138
|
-
targetInfo.type === 'page' || targetInfo.type === 'iframe';
|
|
139
|
-
const isExtension = targetInfo.url.startsWith('chrome-extension://');
|
|
140
|
-
if (
|
|
141
|
-
(!this.#targetFilterCallback ||
|
|
142
|
-
this.#targetFilterCallback(targetForFilter)) &&
|
|
143
|
-
isPageOrFrame &&
|
|
144
|
-
!isExtension
|
|
145
|
-
) {
|
|
146
|
-
this.#targetsIdsForInit.add(targetId);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
|
|
151
131
|
async initialize(): Promise<void> {
|
|
152
132
|
await this.#connection.send('Target.setDiscoverTargets', {
|
|
153
133
|
discover: true,
|
|
154
134
|
filter: this.#discoveryFilter,
|
|
155
135
|
});
|
|
156
136
|
|
|
157
|
-
this.#storeExistingTargetsForInit();
|
|
158
|
-
|
|
159
137
|
await this.#connection.send('Target.setAutoAttach', {
|
|
160
138
|
waitForDebuggerOnStart: true,
|
|
161
139
|
flatten: true,
|
|
@@ -168,6 +146,7 @@ export class TargetManager
|
|
|
168
146
|
...this.#discoveryFilter,
|
|
169
147
|
],
|
|
170
148
|
});
|
|
149
|
+
this.#initialAttachDone = true;
|
|
171
150
|
this.#finishInitializationIfReady();
|
|
172
151
|
await this.#initializeDeferred.valueOrThrow();
|
|
173
152
|
}
|
|
@@ -346,7 +325,6 @@ export class TargetManager
|
|
|
346
325
|
// should determine if a target is auto-attached or not with the help of
|
|
347
326
|
// CDP.
|
|
348
327
|
if (targetInfo.type === 'service_worker') {
|
|
349
|
-
this.#finishInitializationIfReady(targetInfo.targetId);
|
|
350
328
|
await silentDetach();
|
|
351
329
|
if (this.#attachedTargetsByTargetId.has(targetInfo.targetId)) {
|
|
352
330
|
return;
|
|
@@ -370,13 +348,26 @@ export class TargetManager
|
|
|
370
348
|
parentSession instanceof CdpCDPSession ? parentSession : undefined,
|
|
371
349
|
);
|
|
372
350
|
|
|
351
|
+
const parentTarget =
|
|
352
|
+
parentSession instanceof CdpCDPSession ? parentSession.target() : null;
|
|
353
|
+
|
|
373
354
|
if (this.#targetFilterCallback && !this.#targetFilterCallback(target)) {
|
|
374
355
|
this.#ignoredTargets.add(targetInfo.targetId);
|
|
375
|
-
|
|
356
|
+
if (parentTarget?.type() === 'tab') {
|
|
357
|
+
this.#finishInitializationIfReady(parentTarget._targetId);
|
|
358
|
+
}
|
|
376
359
|
await silentDetach();
|
|
377
360
|
return;
|
|
378
361
|
}
|
|
379
362
|
|
|
363
|
+
if (
|
|
364
|
+
this.#waitForInitiallyDiscoveredTargets &&
|
|
365
|
+
event.targetInfo.type === 'tab' &&
|
|
366
|
+
!this.#initialAttachDone
|
|
367
|
+
) {
|
|
368
|
+
this.#targetsIdsForInit.add(event.targetInfo.targetId);
|
|
369
|
+
}
|
|
370
|
+
|
|
380
371
|
this.#setupAttachmentListeners(session);
|
|
381
372
|
|
|
382
373
|
if (isExistingTarget) {
|
|
@@ -391,19 +382,16 @@ export class TargetManager
|
|
|
391
382
|
this.#attachedTargetsBySessionId.set(session.id(), target);
|
|
392
383
|
}
|
|
393
384
|
|
|
394
|
-
const parentTarget =
|
|
395
|
-
parentSession instanceof CDPSession
|
|
396
|
-
? (parentSession as CdpCDPSession).target()
|
|
397
|
-
: null;
|
|
398
385
|
parentTarget?._addChildTarget(target);
|
|
399
386
|
|
|
400
387
|
parentSession.emit(CDPSessionEvent.Ready, session);
|
|
401
388
|
|
|
402
|
-
this.#targetsIdsForInit.delete(target._targetId);
|
|
403
389
|
if (!isExistingTarget) {
|
|
404
390
|
this.emit(TargetManagerEvent.TargetAvailable, target);
|
|
405
391
|
}
|
|
406
|
-
|
|
392
|
+
if (parentTarget?.type() === 'tab') {
|
|
393
|
+
this.#finishInitializationIfReady(parentTarget._targetId);
|
|
394
|
+
}
|
|
407
395
|
|
|
408
396
|
// TODO: the browser might be shutting down here. What do we do with the
|
|
409
397
|
// error?
|
|
@@ -422,6 +410,11 @@ export class TargetManager
|
|
|
422
410
|
if (targetId !== undefined) {
|
|
423
411
|
this.#targetsIdsForInit.delete(targetId);
|
|
424
412
|
}
|
|
413
|
+
// If we are still initializing it might be that we have not learned about
|
|
414
|
+
// some targets yet.
|
|
415
|
+
if (!this.#initialAttachDone) {
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
425
418
|
if (this.#targetsIdsForInit.size === 0) {
|
|
426
419
|
this.#initializeDeferred.resolve();
|
|
427
420
|
}
|
|
@@ -6,21 +6,23 @@
|
|
|
6
6
|
|
|
7
7
|
import {Deferred} from '../util/Deferred.js';
|
|
8
8
|
import {rewriteError} from '../util/ErrorLike.js';
|
|
9
|
-
import {
|
|
9
|
+
import type {GetIdFn} from '../util/incremental-id-generator.js';
|
|
10
10
|
|
|
11
11
|
import {ProtocolError, TargetCloseError} from './Errors.js';
|
|
12
12
|
import {debugError} from './util.js';
|
|
13
13
|
|
|
14
|
-
const idGenerator = createIncrementalIdGenerator();
|
|
15
|
-
|
|
16
14
|
/**
|
|
17
15
|
* Manages callbacks and their IDs for the protocol request/response communication.
|
|
18
16
|
*
|
|
19
17
|
* @internal
|
|
20
18
|
*/
|
|
21
19
|
export class CallbackRegistry {
|
|
22
|
-
#callbacks = new Map<number, Callback>();
|
|
23
|
-
#idGenerator
|
|
20
|
+
readonly #callbacks = new Map<number, Callback>();
|
|
21
|
+
readonly #idGenerator: GetIdFn;
|
|
22
|
+
|
|
23
|
+
constructor(idGenerator: GetIdFn) {
|
|
24
|
+
this.#idGenerator = idGenerator;
|
|
25
|
+
}
|
|
24
26
|
|
|
25
27
|
create(
|
|
26
28
|
label: string,
|
|
@@ -112,6 +112,14 @@ export interface ConnectOptions {
|
|
|
112
112
|
browserWSEndpoint?: string;
|
|
113
113
|
browserURL?: string;
|
|
114
114
|
transport?: ConnectionTransport;
|
|
115
|
+
/**
|
|
116
|
+
* @internal
|
|
117
|
+
*
|
|
118
|
+
* Custom ID generator for CDP / BiDi messages. Useful if the same transport
|
|
119
|
+
* is shared for multiple connections.
|
|
120
|
+
*/
|
|
121
|
+
idGenerator?: () => number;
|
|
122
|
+
|
|
115
123
|
/**
|
|
116
124
|
* Headers to use for the web socket connection.
|
|
117
125
|
* @remarks
|
|
@@ -30,6 +30,10 @@ import {TimeoutError} from '../common/Errors.js';
|
|
|
30
30
|
import type {SupportedBrowser} from '../common/SupportedBrowser.js';
|
|
31
31
|
import {debugError, DEFAULT_VIEWPORT} from '../common/util.js';
|
|
32
32
|
import type {Viewport} from '../common/Viewport.js';
|
|
33
|
+
import {
|
|
34
|
+
createIncrementalIdGenerator,
|
|
35
|
+
type GetIdFn,
|
|
36
|
+
} from '../util/incremental-id-generator.js';
|
|
33
37
|
|
|
34
38
|
import type {ChromeReleaseChannel, LaunchOptions} from './LaunchOptions.js';
|
|
35
39
|
import {NodeWebSocketTransport as WebSocketTransport} from './NodeWebSocketTransport.js';
|
|
@@ -88,6 +92,7 @@ export abstract class BrowserLauncher {
|
|
|
88
92
|
waitForInitialPage = true,
|
|
89
93
|
protocolTimeout,
|
|
90
94
|
handleDevToolsAsPage,
|
|
95
|
+
idGenerator = createIncrementalIdGenerator(),
|
|
91
96
|
} = options;
|
|
92
97
|
|
|
93
98
|
let {protocol} = options;
|
|
@@ -166,6 +171,7 @@ export abstract class BrowserLauncher {
|
|
|
166
171
|
defaultViewport,
|
|
167
172
|
acceptInsecureCerts,
|
|
168
173
|
networkEnabled,
|
|
174
|
+
idGenerator,
|
|
169
175
|
},
|
|
170
176
|
);
|
|
171
177
|
} else {
|
|
@@ -174,12 +180,14 @@ export abstract class BrowserLauncher {
|
|
|
174
180
|
timeout,
|
|
175
181
|
protocolTimeout,
|
|
176
182
|
slowMo,
|
|
183
|
+
idGenerator,
|
|
177
184
|
});
|
|
178
185
|
} else {
|
|
179
186
|
cdpConnection = await this.createCdpSocketConnection(browserProcess, {
|
|
180
187
|
timeout,
|
|
181
188
|
protocolTimeout,
|
|
182
189
|
slowMo,
|
|
190
|
+
idGenerator,
|
|
183
191
|
});
|
|
184
192
|
}
|
|
185
193
|
|
|
@@ -342,6 +350,7 @@ export abstract class BrowserLauncher {
|
|
|
342
350
|
timeout: number;
|
|
343
351
|
protocolTimeout: number | undefined;
|
|
344
352
|
slowMo: number;
|
|
353
|
+
idGenerator: GetIdFn;
|
|
345
354
|
},
|
|
346
355
|
): Promise<Connection> {
|
|
347
356
|
const browserWSEndpoint = await browserProcess.waitForLineOutput(
|
|
@@ -354,6 +363,8 @@ export abstract class BrowserLauncher {
|
|
|
354
363
|
transport,
|
|
355
364
|
opts.slowMo,
|
|
356
365
|
opts.protocolTimeout,
|
|
366
|
+
/* rawErrors */ false,
|
|
367
|
+
opts.idGenerator,
|
|
357
368
|
);
|
|
358
369
|
}
|
|
359
370
|
|
|
@@ -366,6 +377,7 @@ export abstract class BrowserLauncher {
|
|
|
366
377
|
timeout: number;
|
|
367
378
|
protocolTimeout: number | undefined;
|
|
368
379
|
slowMo: number;
|
|
380
|
+
idGenerator: GetIdFn;
|
|
369
381
|
},
|
|
370
382
|
): Promise<Connection> {
|
|
371
383
|
// stdio was assigned during start(), and the 'pipe' option there adds the
|
|
@@ -375,7 +387,14 @@ export abstract class BrowserLauncher {
|
|
|
375
387
|
pipeWrite as NodeJS.WritableStream,
|
|
376
388
|
pipeRead as NodeJS.ReadableStream,
|
|
377
389
|
);
|
|
378
|
-
return new Connection(
|
|
390
|
+
return new Connection(
|
|
391
|
+
'',
|
|
392
|
+
transport,
|
|
393
|
+
opts.slowMo,
|
|
394
|
+
opts.protocolTimeout,
|
|
395
|
+
/* rawErrors */ false,
|
|
396
|
+
opts.idGenerator,
|
|
397
|
+
);
|
|
379
398
|
}
|
|
380
399
|
|
|
381
400
|
/**
|
|
@@ -417,6 +436,7 @@ export abstract class BrowserLauncher {
|
|
|
417
436
|
timeout: number;
|
|
418
437
|
protocolTimeout: number | undefined;
|
|
419
438
|
slowMo: number;
|
|
439
|
+
idGenerator: GetIdFn;
|
|
420
440
|
defaultViewport: Viewport | null;
|
|
421
441
|
acceptInsecureCerts?: boolean;
|
|
422
442
|
networkEnabled?: boolean;
|
|
@@ -432,6 +452,7 @@ export abstract class BrowserLauncher {
|
|
|
432
452
|
const bidiConnection = new BiDi.BidiConnection(
|
|
433
453
|
browserWSEndpoint,
|
|
434
454
|
transport,
|
|
455
|
+
opts.idGenerator,
|
|
435
456
|
opts.slowMo,
|
|
436
457
|
opts.protocolTimeout,
|
|
437
458
|
);
|
|
@@ -5,7 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
import type * as Buttons from '../../../ui/components/buttons/buttons.js';
|
|
7
7
|
import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
Directives,
|
|
10
|
+
html,
|
|
11
|
+
render,
|
|
12
|
+
} from '../../../ui/lit/lit.js';
|
|
9
13
|
|
|
10
14
|
import buttonDialogStyles from './buttonDialog.css.js';
|
|
11
15
|
import {
|
|
@@ -16,6 +20,8 @@ import {
|
|
|
16
20
|
DialogVerticalPosition,
|
|
17
21
|
} from './Dialog.js';
|
|
18
22
|
|
|
23
|
+
const {ref} = Directives;
|
|
24
|
+
|
|
19
25
|
export type ButtonDialogState = DialogState;
|
|
20
26
|
|
|
21
27
|
export interface ButtonDialogData {
|
|
@@ -96,8 +102,10 @@ export class ButtonDialog extends HTMLElement {
|
|
|
96
102
|
<style>${buttonDialogStyles}</style>
|
|
97
103
|
<devtools-button
|
|
98
104
|
@click=${this.#showDialog}
|
|
99
|
-
|
|
100
|
-
|
|
105
|
+
${ref(el => {
|
|
106
|
+
if (el instanceof HTMLElement) {
|
|
107
|
+
this.#showButton = el as Buttons.Button.Button;
|
|
108
|
+
}
|
|
101
109
|
})}
|
|
102
110
|
.data=${{
|
|
103
111
|
variant: this.#data.variant,
|
|
@@ -123,8 +131,10 @@ export class ButtonDialog extends HTMLElement {
|
|
|
123
131
|
.dialogTitle=${this.#data.dialogTitle}
|
|
124
132
|
.jslogContext=${this.#data.jslogContext ?? ''}
|
|
125
133
|
.state=${this.#data.state ?? DialogState.EXPANDED}
|
|
126
|
-
|
|
127
|
-
|
|
134
|
+
${ref(el => {
|
|
135
|
+
if (el instanceof HTMLElement) {
|
|
136
|
+
this.#dialog = el as DialogElement;
|
|
137
|
+
}
|
|
128
138
|
})}
|
|
129
139
|
>
|
|
130
140
|
<slot></slot>
|
|
@@ -46,7 +46,7 @@ export class ExpandableList extends HTMLElement {
|
|
|
46
46
|
<div>
|
|
47
47
|
${this.#rows.length > 1 ?
|
|
48
48
|
html`
|
|
49
|
-
<button title
|
|
49
|
+
<button title=${ifDefined(this.#title)} aria-label=${ifDefined(this.#title)} aria-expanded=${this.#expanded ? 'true' : 'false'} @click=${() => this.#onArrowClick()} class="arrow-icon-button">
|
|
50
50
|
<span class="arrow-icon ${this.#expanded ? 'expanded' : ''}"
|
|
51
51
|
jslog=${VisualLogging.expand().track({click: true})}></span>
|
|
52
52
|
</button>
|
|
@@ -3,13 +3,11 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as ComponentServerSetup from './component-server-setup.js';
|
|
6
|
-
import * as Directives from './directives.js';
|
|
7
6
|
import * as GetRootNode from './get-root-node.js';
|
|
8
7
|
import * as ScheduledRender from './scheduled-render.js';
|
|
9
8
|
|
|
10
9
|
export {
|
|
11
10
|
ComponentServerSetup,
|
|
12
|
-
Directives,
|
|
13
11
|
GetRootNode,
|
|
14
12
|
ScheduledRender,
|
|
15
13
|
};
|
|
@@ -14,7 +14,7 @@ import menuStyles from './menu.css.js';
|
|
|
14
14
|
import menuGroupStyles from './menuGroup.css.js';
|
|
15
15
|
import menuItemStyles from './menuItem.css.js';
|
|
16
16
|
|
|
17
|
-
const {html} = Lit;
|
|
17
|
+
const {html, Directives: {ref}} = Lit;
|
|
18
18
|
|
|
19
19
|
export interface MenuData {
|
|
20
20
|
/**
|
|
@@ -380,8 +380,10 @@ export class Menu extends HTMLElement {
|
|
|
380
380
|
.dialogShownCallback=${this.#dialogDeployed.bind(this)}
|
|
381
381
|
.horizontalAlignment=${this.horizontalAlignment}
|
|
382
382
|
.getConnectorCustomXPosition=${this.getConnectorCustomXPosition}
|
|
383
|
-
|
|
384
|
-
|
|
383
|
+
${ref(el => {
|
|
384
|
+
if (el instanceof HTMLElement) {
|
|
385
|
+
this.#dialog = el as Dialogs.Dialog.Dialog;
|
|
386
|
+
}
|
|
385
387
|
})}
|
|
386
388
|
>
|
|
387
389
|
<span id="container" role="menu" tabIndex="0" @keydown=${this.#handleDialogKeyDown} jslog=${VisualLogging.menu().track({resize: true, keydown: 'Escape'})}>
|
|
@@ -69,7 +69,7 @@ export class PreviewToggle extends HTMLElement {
|
|
|
69
69
|
<devtools-checkbox
|
|
70
70
|
?checked=${checked}
|
|
71
71
|
@change=${this.#checkboxChanged}
|
|
72
|
-
aria-label=${this.#name}
|
|
72
|
+
aria-label=${this.#name} >
|
|
73
73
|
<devtools-icon name="experiment" class="medium">
|
|
74
74
|
</devtools-icon>${this.#name}
|
|
75
75
|
</devtools-checkbox>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Copyright 2020 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import * as Common from '../../../core/common/common.js';
|
|
6
|
+
import {SurveyLink} from '../survey_link/survey_link.js';
|
|
7
|
+
|
|
8
|
+
export function render(container: HTMLElement): void {
|
|
9
|
+
const link = new SurveyLink.SurveyLink();
|
|
10
|
+
container.appendChild(link);
|
|
11
|
+
|
|
12
|
+
link.data = {
|
|
13
|
+
trigger: 'test trigger',
|
|
14
|
+
promptText: Common.UIString.LocalizedEmptyString,
|
|
15
|
+
canShowSurvey: (_trigger, callback) => {
|
|
16
|
+
setTimeout(callback.bind(undefined, {canShowSurvey: true}), 500);
|
|
17
|
+
},
|
|
18
|
+
showSurvey: (_trigger, callback) => {
|
|
19
|
+
setTimeout(callback.bind(undefined, {surveyShown: true}), 1500);
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Copyright 2024 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import {Switch} from './switch.js';
|
|
6
|
+
|
|
7
|
+
export async function render(container: HTMLElement) {
|
|
8
|
+
function switchExample({checked, disabled}: {checked: boolean, disabled: boolean}): HTMLElement {
|
|
9
|
+
const example = document.createElement('div');
|
|
10
|
+
example.style.marginTop = '20px';
|
|
11
|
+
const explanation = document.createElement('div');
|
|
12
|
+
const disabledExplanation = document.createElement('div');
|
|
13
|
+
const component = new Switch.Switch();
|
|
14
|
+
component.checked = checked;
|
|
15
|
+
component.disabled = disabled;
|
|
16
|
+
explanation.textContent = `is checked? ${component.checked}`;
|
|
17
|
+
disabledExplanation.textContent = `is disabled? ${component.disabled}`;
|
|
18
|
+
component.addEventListener(Switch.SwitchChangeEvent.eventName, ev => {
|
|
19
|
+
explanation.textContent = `is checked? ${ev.checked}`;
|
|
20
|
+
});
|
|
21
|
+
example.appendChild(component);
|
|
22
|
+
example.appendChild(explanation);
|
|
23
|
+
example.appendChild(disabledExplanation);
|
|
24
|
+
return example;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Basic
|
|
28
|
+
container.appendChild(switchExample({checked: false, disabled: false}));
|
|
29
|
+
|
|
30
|
+
// Already checked
|
|
31
|
+
container.appendChild(switchExample({checked: true, disabled: false}));
|
|
32
|
+
|
|
33
|
+
// Disabled
|
|
34
|
+
container.appendChild(switchExample({checked: false, disabled: true}));
|
|
35
|
+
|
|
36
|
+
// Disabled & checked
|
|
37
|
+
container.appendChild(switchExample({checked: true, disabled: true}));
|
|
38
|
+
}
|