chrome-devtools-frontend 1.0.1726686 → 1.0.1730971
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/rules/tests/test-strict-assertions-and-literal-expectations.md +1 -1
- package/.agents/rules/tests/test-view-and-presenter-isolation.md +1 -1
- package/.agents/rules/ui-and-widgets/ui-accessibility-and-semantic-html.md +1 -1
- package/.agents/rules/ui-and-widgets/ui-css-scoping-and-flex-layout.md +2 -2
- package/.agents/rules/ui-and-widgets/ui-declarative-child-widget-composition.md +5 -5
- package/.agents/rules/ui-and-widgets/ui-lit-declarative-templates-and-directives.md +2 -2
- package/.agents/rules/ui-and-widgets/ui-localization-and-uistrings-hygiene.md +2 -2
- package/.agents/rules/ui-and-widgets/ui-modern-component-and-encapsulation-standards.md +3 -3
- package/.agents/rules/ui-and-widgets/ui-pure-view-and-presenter-separation.md +2 -2
- package/.agents/rules/ui-and-widgets/ui-reactive-widget-update-lifecycle.md +2 -2
- package/.agents/rules/ui-and-widgets/ui-view-output-and-callback-contracts.md +2 -2
- package/.agents/rules/ui-and-widgets/ui-widget-dom-and-listener-lifecycle.md +2 -2
- package/.agents/skills/code-review/SKILL.md +63 -12
- package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +38 -10
- package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +1 -0
- package/.agents/skills/ui-widgets/SKILL.md +8 -2
- package/.agents/skills/write-ai-eval-test/SKILL.md +106 -0
- package/AUTHORS +2 -0
- package/DIR_METADATA +1 -2
- package/README.md +48 -26
- package/config/typescript/tsconfig.base.json +1 -0
- package/config/typescript/tsconfig.eslint.json +1 -0
- package/docs/contributing/changes.md +25 -0
- package/docs/ui_engineering.md +13 -4
- package/eslint.config.mjs +323 -41
- package/front_end/core/common/Color.ts +7 -7
- package/front_end/core/common/ParsedURL.ts +3 -3
- package/front_end/core/common/ResolverBase.ts +3 -3
- package/front_end/core/common/SegmentedRange.ts +3 -3
- package/front_end/core/common/SimpleHistoryManager.ts +14 -14
- package/front_end/core/common/Trie.ts +3 -3
- package/front_end/core/common/VersionController.ts +7 -7
- package/front_end/core/host/InspectorFrontendHost.ts +2 -2
- package/front_end/core/host/InspectorFrontendHostAPI.ts +9 -1
- package/front_end/core/host/InspectorFrontendHostStub.ts +1 -1
- package/front_end/core/host/UserMetrics.ts +4 -0
- package/front_end/core/host/UserMetricsEnums.ts +2 -1
- package/front_end/core/platform/StringUtilities.ts +54 -13
- package/front_end/core/platform/node/HostRuntime.ts +13 -7
- package/front_end/core/protocol_client/DevToolsCDPConnection.ts +4 -5
- package/front_end/core/root/Runtime.ts +5 -0
- package/front_end/core/sdk/AccessibilityModel.ts +5 -5
- package/front_end/core/sdk/AnimationModel.ts +17 -19
- package/front_end/core/sdk/CPUProfilerModel.ts +3 -3
- package/front_end/core/sdk/CPUThrottlingManager.ts +7 -0
- package/front_end/core/sdk/CSSMatchedStyles.ts +73 -13
- package/front_end/core/sdk/CSSMetadata.ts +7 -7
- package/front_end/core/sdk/CSSModel.ts +33 -33
- package/front_end/core/sdk/CSSProperty.ts +5 -5
- package/front_end/core/sdk/CSSRule.ts +6 -6
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +4 -4
- package/front_end/core/sdk/Connections.ts +16 -16
- package/front_end/core/sdk/ConsoleModel.ts +44 -47
- package/front_end/core/sdk/CookieParser.ts +11 -11
- package/front_end/core/sdk/EmulationModel.ts +35 -36
- package/front_end/core/sdk/EventBreakpointsModel.ts +11 -11
- package/front_end/core/sdk/FrameManager.ts +16 -16
- package/front_end/core/sdk/IsolateManager.ts +2 -2
- package/front_end/core/sdk/IssuesModel.ts +2 -2
- package/front_end/core/sdk/OverlayModel.ts +19 -19
- package/front_end/core/sdk/PageResourceLoader.ts +14 -16
- package/front_end/core/sdk/RemoteObject.ts +9 -9
- package/front_end/core/sdk/Resource.ts +2 -2
- package/front_end/core/sdk/RuntimeModel.ts +7 -7
- package/front_end/core/sdk/Script.ts +6 -6
- package/front_end/core/sdk/ServiceWorkerManager.ts +36 -10
- package/front_end/core/sdk/SourceMap.ts +18 -20
- package/front_end/core/sdk/SourceMapManager.ts +2 -2
- package/front_end/core/sdk/TargetManager.ts +2 -2
- package/front_end/devtools_compatibility.js +7 -3
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +2 -2
- package/front_end/entrypoints/node_app/app/NodeConnectionsPanel.ts +203 -115
- package/front_end/generated/InspectorBackendCommands.ts +1 -1
- package/front_end/generated/SupportedCSSProperties.ts +1 -3
- package/front_end/generated/protocol.ts +1 -0
- package/front_end/models/ai_assistance/AiAgent2.ts +36 -12
- package/front_end/models/ai_assistance/AiConversation.ts +8 -2
- package/front_end/models/ai_assistance/agents/AiAgent.ts +137 -62
- package/front_end/models/ai_assistance/agents/ExecuteJavascript.ts +2 -2
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.snapshot.txt +149 -2
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.ts +269 -42
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +3 -0
- package/front_end/models/ai_assistance/tools/GetLighthouseAudits.ts +9 -0
- package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +13 -2
- package/front_end/models/ai_assistance/tools/RunLighthouse.ts +23 -7
- package/front_end/models/ai_assistance/tools/Tool.ts +7 -5
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +22 -24
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +60 -60
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +24 -24
- package/front_end/models/bindings/DefaultScriptMapping.ts +8 -8
- package/front_end/models/bindings/FileUtils.ts +13 -13
- package/front_end/models/bindings/PresentationConsoleMessageHelper.ts +3 -3
- package/front_end/models/bindings/ResourceScriptMapping.ts +23 -23
- package/front_end/models/comment_manager/CommentManager.ts +3 -3
- package/front_end/models/comment_manager/CommentThread.ts +50 -5
- package/front_end/models/cpu_profile/CPUProfileDataModel.ts +14 -14
- package/front_end/models/cpu_profile/ProfileTreeModel.ts +4 -4
- package/front_end/models/elements/StyleChanges.ts +38 -0
- package/front_end/models/emulation/EmulatedDevices.ts +12 -12
- package/front_end/models/har/HARFormat.ts +4 -4
- package/front_end/models/javascript_metadata/NativeFunctions.ts +5 -1
- package/front_end/models/lighthouse/LighthouseReporterTypes.ts +57 -3
- package/front_end/models/lighthouse/RunTypes.ts +9 -1
- package/front_end/models/logs/LogManager.ts +2 -2
- package/front_end/models/persistence/AutomaticFileSystemManager.ts +3 -0
- package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +24 -24
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +6 -0
- package/front_end/models/persistence/NetworkPersistenceManager.ts +8 -3
- package/front_end/models/trace/LanternComputationData.ts +37 -11
- package/front_end/models/trace/Processor.ts +2 -1
- package/front_end/models/trace/extras/TraceTree.ts +36 -10
- package/front_end/models/trace/handlers/InitiatorsHandler.ts +27 -34
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +2 -6
- package/front_end/models/trace/handlers/SamplesHandler.ts +9 -6
- package/front_end/models/workspace/FileManager.ts +6 -0
- package/front_end/panels/accessibility/ARIAAttributesView.ts +4 -4
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +8 -1
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +15 -17
- package/front_end/panels/accessibility/AccessibilitySubPane.ts +1 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +5 -5
- package/front_end/panels/ai_assistance/ExternalHandler.ts +10 -1
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +27 -22
- package/front_end/panels/ai_assistance/components/DisabledWidget.ts +19 -23
- package/front_end/panels/ai_assistance/components/ExploreWidget.ts +2 -2
- package/front_end/panels/ai_assistance/components/PermissionPrompt.ts +23 -9
- package/front_end/panels/ai_assistance/components/chatInput.css +1 -1
- package/front_end/panels/animation/AnimationTimeline.ts +37 -17
- package/front_end/panels/animation/animationTimeline.css +19 -3
- package/front_end/panels/application/AppManifestView.ts +1 -2
- package/front_end/panels/application/ApplicationPanelSidebar.ts +143 -128
- package/front_end/panels/application/DOMStorageItemsView.ts +14 -14
- package/front_end/panels/application/DeviceBoundSessionsView.ts +10 -13
- package/front_end/panels/application/ExtensionStorageItemsView.ts +3 -4
- package/front_end/panels/application/IndexedDBViews.ts +8 -4
- package/front_end/panels/application/KeyValueStorageItemsView.ts +4 -5
- package/front_end/panels/application/PrivateVerificationTokensView.ts +53 -0
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +12 -8
- package/front_end/panels/application/ServiceWorkersView.ts +1 -2
- package/front_end/panels/application/StorageItemsToolbar.ts +3 -3
- package/front_end/panels/application/StorageView.ts +2 -2
- package/front_end/panels/application/WebMCPView.ts +91 -109
- package/front_end/panels/application/application.ts +2 -0
- package/front_end/panels/application/components/StorageMetadataView.ts +6 -6
- package/front_end/panels/application/preloading/PreloadingView.ts +70 -37
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +2 -2
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +3 -3
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +12 -0
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +10 -11
- package/front_end/panels/application/privateVerificationTokensView.css +20 -0
- package/front_end/panels/application/serviceWorkersView.css +2 -2
- package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +24 -24
- package/front_end/panels/changes/ChangesSidebar.ts +5 -5
- package/front_end/panels/changes/ChangesView.ts +10 -11
- package/front_end/panels/comments/CommentsPane.ts +292 -102
- package/front_end/panels/comments/commentsPane.css +93 -12
- package/front_end/panels/common/CommentThreadWidget.ts +69 -0
- package/front_end/panels/common/CommentsOverlayWidget.ts +108 -29
- package/front_end/panels/common/CommentsStatusBarPill.ts +17 -6
- package/front_end/panels/common/DOMLinkifier.ts +37 -12
- package/front_end/panels/common/ExtensionPanel.ts +13 -4
- package/front_end/panels/common/ExtensionServer.ts +27 -3
- package/front_end/panels/common/PersistenceUtils.ts +3 -3
- package/front_end/panels/common/commentThreadWidget.css +25 -1
- package/front_end/panels/common/common-meta.ts +10 -0
- package/front_end/panels/console/ConsolePinPane.ts +13 -15
- package/front_end/panels/console/ConsolePrompt.ts +173 -95
- package/front_end/panels/console/ConsoleSidebar.ts +2 -2
- package/front_end/panels/console/ConsoleView.ts +75 -79
- package/front_end/panels/console/ConsoleViewMessage.ts +52 -4
- package/front_end/panels/console/SymbolizedErrorWidget.ts +8 -4
- package/front_end/panels/console/consolePrompt.css +1 -1
- package/front_end/panels/console/consoleView.css +1 -1
- package/front_end/panels/console_counters/WarningErrorCounter.ts +3 -4
- package/front_end/panels/coverage/CoverageListView.ts +2 -2
- package/front_end/panels/coverage/CoverageView.ts +20 -5
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +4 -3
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewStartView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewUnusedDeclarations.ts +8 -8
- package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +2 -3
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +4 -5
- package/front_end/panels/elements/AccessibilityTreeUtils.ts +6 -7
- package/front_end/panels/elements/CSSValueTraceView.ts +3 -3
- package/front_end/panels/elements/ClassesPaneWidget.ts +1 -2
- package/front_end/panels/elements/ComputedStyleWidget.ts +15 -14
- package/front_end/panels/elements/DOMTreeElementWidget.ts +5 -4
- package/front_end/panels/elements/DOMTreeWidget.ts +2 -1
- package/front_end/panels/elements/ElementStatePaneWidget.ts +2 -2
- package/front_end/panels/elements/ElementsPanel.ts +1 -0
- package/front_end/panels/elements/EventListenersWidget.ts +2 -2
- package/front_end/panels/elements/LayoutPane.ts +2 -2
- package/front_end/panels/elements/PlatformFontsWidget.ts +3 -3
- package/front_end/panels/elements/PropertiesWidget.ts +9 -10
- package/front_end/panels/elements/PropertyRenderer.ts +72 -11
- package/front_end/panels/elements/StandaloneStylesContainer.ts +5 -10
- package/front_end/panels/elements/StyleEditorWidget.ts +30 -16
- package/front_end/panels/elements/StylePropertiesSection.ts +93 -44
- package/front_end/panels/elements/StylePropertyTreeElement.ts +230 -302
- package/front_end/panels/elements/StylesContainer.ts +2 -3
- package/front_end/panels/elements/StylesSidebarPane.ts +4 -13
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +66 -37
- package/front_end/panels/elements/components/CSSHintDetailsView.ts +51 -41
- package/front_end/panels/elements/components/CSSPropertyDocsView.ts +75 -65
- package/front_end/panels/elements/components/CSSQuery.ts +112 -74
- package/front_end/panels/elements/components/CSSVariableValueView.ts +109 -68
- package/front_end/panels/elements/components/ComputedStyleProperty.ts +64 -45
- package/front_end/panels/elements/components/ElementsTreeExpandButton.ts +35 -28
- package/front_end/panels/elements/components/QueryContainer.ts +104 -74
- package/front_end/panels/elements/components/accessibilityTreeNode.css +22 -20
- package/front_end/panels/elements/components/computedStyleProperty.css +2 -0
- package/front_end/panels/elements/components/cssHintDetailsView.css +23 -21
- package/front_end/panels/elements/components/cssPropertyDocsView.css +38 -36
- package/front_end/panels/elements/components/cssVariableValueView.css +42 -40
- package/front_end/panels/elements/components/elementsTreeExpandButton.css +5 -2
- package/front_end/panels/elements/components/queryContainer.css +23 -21
- package/front_end/panels/elements/stylesSidebarPane.css +3 -3
- package/front_end/panels/emulation/DeviceModeToolbar.ts +2 -2
- package/front_end/panels/emulation/InspectedPagePlaceholder.ts +2 -2
- package/front_end/panels/emulation/MediaQueryInspector.ts +9 -10
- package/front_end/panels/emulation/mediaQueryInspector.css +1 -1
- package/front_end/panels/event_listeners/EventListenersView.ts +2 -2
- package/front_end/panels/issues/AffectedCookiesView.ts +144 -101
- package/front_end/panels/issues/AffectedDescendantsWithinSelectElementView.ts +83 -31
- package/front_end/panels/issues/AffectedDirectivesView.ts +218 -135
- package/front_end/panels/issues/AffectedDocumentsInQuirksModeView.ts +84 -34
- package/front_end/panels/issues/AffectedElementsView.ts +86 -23
- package/front_end/panels/issues/AffectedLazyLoadImagesView.ts +2 -2
- package/front_end/panels/issues/AffectedMetadataAllowedSitesView.ts +2 -2
- package/front_end/panels/issues/AffectedPartitioningBlobURLView.ts +36 -11
- package/front_end/panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts +135 -58
- package/front_end/panels/issues/AffectedSourcesView.ts +49 -28
- package/front_end/panels/issues/AffectedTrackingSitesView.ts +3 -4
- package/front_end/panels/issues/CorsIssueDetailsView.ts +490 -269
- package/front_end/panels/issues/GenericIssueDetailsView.ts +2 -2
- package/front_end/panels/issues/IssueKindView.ts +63 -48
- package/front_end/panels/issues/IssueView.ts +14 -18
- package/front_end/panels/issues/components/ElementsPanelLink.ts +70 -34
- package/front_end/panels/issues/components/HideIssuesMenu.ts +56 -32
- package/front_end/panels/issues/components/elementsPanelLink.css +10 -6
- package/front_end/panels/issues/components/hideIssuesMenu.css +16 -14
- package/front_end/panels/issues/issues.ts +2 -0
- package/front_end/panels/issues/issuesTree.css +4 -4
- package/front_end/panels/lighthouse/LighthouseController.ts +6 -6
- package/front_end/panels/lighthouse/LighthouseStatusView.ts +12 -13
- package/front_end/panels/lighthouse/lighthouseStartView.css +1 -1
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +159 -161
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorView.ts +228 -0
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +32 -41
- package/front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css +2 -2
- package/front_end/panels/linear_memory_inspector/linear_memory_inspector.ts +2 -0
- package/front_end/panels/media/EventDisplayTable.ts +2 -2
- package/front_end/panels/media/MainView.ts +132 -66
- package/front_end/panels/media/PlayerDetailView.ts +32 -14
- package/front_end/panels/media/PlayerListView.ts +83 -23
- package/front_end/panels/media/PlayerPropertiesView.ts +2 -2
- package/front_end/panels/media/TickingFlameChart.ts +153 -63
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +2 -2
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +615 -464
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +43 -0
- package/front_end/panels/network/EventSourceMessagesView.ts +3 -3
- package/front_end/panels/network/NetworkConfigView.ts +6 -2
- package/front_end/panels/network/NetworkDataGridNode.ts +2 -1
- package/front_end/panels/network/NetworkItemView.ts +27 -26
- package/front_end/panels/network/NetworkManageCustomHeadersView.ts +236 -97
- package/front_end/panels/network/NetworkOverview.ts +8 -10
- package/front_end/panels/network/RequestConditionsDrawer.ts +8 -4
- package/front_end/panels/network/RequestDeviceBoundSessionsView.ts +2 -4
- package/front_end/panels/network/RequestHTMLView.ts +26 -7
- package/front_end/panels/network/RequestHeadersView.ts +2 -2
- package/front_end/panels/network/RequestInitiatorView.ts +21 -22
- package/front_end/panels/network/RequestPayloadView.ts +2 -16
- package/front_end/panels/network/RequestPreviewView.ts +5 -5
- package/front_end/panels/network/RequestTimingView.ts +6 -6
- package/front_end/panels/network/ResourceDirectSocketChunkView.ts +5 -6
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +4 -3
- package/front_end/panels/network/ShowMoreDetailsWidget.ts +11 -12
- package/front_end/panels/network/SignedExchangeInfoView.ts +2 -2
- package/front_end/panels/network/networkLogView.css +2 -2
- package/front_end/panels/network/networkManageCustomHeadersView.css +27 -6
- package/front_end/panels/network/requestConditionsDrawer.css +1 -1
- package/front_end/panels/network/requestInitiatorView.css +5 -3
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +2 -2
- package/front_end/panels/profiler/HeapDetachedElementsView.ts +1 -2
- package/front_end/panels/profiler/HeapTimelineOverview.ts +77 -15
- package/front_end/panels/profiler/IsolateSelector.ts +258 -187
- package/front_end/panels/profiler/ProfileLauncherView.ts +7 -29
- package/front_end/panels/profiler/profileLauncherView.css +6 -1
- package/front_end/panels/protocol_monitor/JSONEditor.ts +4 -5
- package/front_end/panels/recorder/ControlButton.ts +1 -1
- package/front_end/panels/recorder/RecordingListView.ts +2 -4
- package/front_end/panels/recorder/RecordingView.ts +1 -2
- package/front_end/panels/recorder/SelectorPicker.ts +2 -4
- package/front_end/panels/recorder/StepView.ts +24 -10
- package/front_end/panels/recorder/TimelineSection.ts +1 -1
- package/front_end/panels/recorder/recordingView.css +1 -1
- package/front_end/panels/screencast/ScreencastApp.ts +1 -1
- package/front_end/panels/search/SearchResultsPane.ts +11 -12
- package/front_end/panels/search/SearchView.ts +8 -10
- package/front_end/panels/security/SecurityPanel.ts +1 -8
- package/front_end/panels/security/SecurityPanelSidebar.ts +2 -2
- package/front_end/panels/security/mainView.css +1 -1
- package/front_end/panels/sensors/LocationsSettingsTab.ts +1 -2
- package/front_end/panels/settings/AISettingsTab.ts +1 -1
- package/front_end/panels/settings/BackendLinkingSettingsTab.ts +34 -20
- package/front_end/panels/settings/EditFileSystemView.ts +2 -2
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +375 -197
- package/front_end/panels/settings/KeybindsSettingsTab.ts +570 -414
- package/front_end/panels/settings/SettingsScreen.ts +312 -114
- package/front_end/panels/settings/WorkspaceSettingsTab.ts +2 -2
- package/front_end/panels/settings/aiSettingsTab.css +1 -4
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +924 -578
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +9 -2
- package/front_end/panels/settings/emulation/devicesSettingsTab.css +39 -0
- package/front_end/panels/settings/frameworkIgnoreListSettingsTab.css +37 -8
- package/front_end/panels/settings/settingsScreen.css +0 -24
- package/front_end/panels/sources/BreakpointEditDialog.ts +9 -6
- package/front_end/panels/sources/BreakpointsView.ts +25 -4
- package/front_end/panels/sources/CallStackSidebarPane.ts +7 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +1 -0
- package/front_end/panels/sources/GoToLineQuickOpen.ts +8 -8
- package/front_end/panels/sources/NavigatorView.ts +521 -439
- package/front_end/panels/sources/PersistenceActions.ts +11 -12
- package/front_end/panels/sources/ProfilePlugin.ts +28 -17
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +3 -4
- package/front_end/panels/sources/SourcesNavigator.ts +9 -9
- package/front_end/panels/sources/SourcesPanel.ts +2 -2
- package/front_end/panels/sources/SourcesView.ts +3 -3
- package/front_end/panels/sources/ThreadsSidebarPane.ts +2 -2
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +2 -2
- package/front_end/panels/sources/components/HeadersView.ts +1 -2
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +5 -6
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +73 -34
- package/front_end/panels/timeline/IsolateSelector.ts +25 -37
- package/front_end/panels/timeline/StatusDialog.ts +5 -7
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +10 -13
- package/front_end/panels/timeline/TimelineDetailsView.ts +40 -21
- package/front_end/panels/timeline/TimelineEventOverview.ts +130 -34
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +1 -1
- package/front_end/panels/timeline/TimelineMiniMap.ts +255 -103
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +19 -11
- package/front_end/panels/timeline/TimelinePanel.ts +1 -0
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +11 -12
- package/front_end/panels/timeline/TimelineTreeView.ts +240 -122
- package/front_end/panels/timeline/TimelineUIUtils.ts +12 -0
- package/front_end/panels/timeline/components/BreadcrumbsUI.ts +5 -4
- package/front_end/panels/timeline/components/DetailsView.ts +97 -65
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +2 -2
- package/front_end/panels/timeline/components/MetricCard.ts +2 -2
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +11 -12
- package/front_end/panels/timeline/components/NetworkTrackWidget.ts +57 -50
- package/front_end/panels/timeline/components/RelatedInsightChips.ts +2 -2
- package/front_end/panels/timeline/components/Sidebar.ts +161 -109
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +33 -12
- package/front_end/panels/timeline/components/SidebarInsightsTab.ts +3 -0
- package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +11 -11
- package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +6 -7
- package/front_end/panels/timeline/components/networkTrackWidget.css +24 -22
- package/front_end/panels/timeline/components/sidebarInsightsTab.css +1 -1
- package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +15 -10
- package/front_end/panels/timeline/overlays/components/entryLabelOverlay.css +1 -1
- package/front_end/panels/timeline/timelinePanel.css +5 -0
- package/front_end/panels/timeline/timelineStatusDialog.css +1 -1
- package/front_end/panels/web_audio/WebAudioView.ts +2 -2
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/legacy-javascript/README.chromium +2 -2
- package/front_end/third_party/legacy-javascript/lib/legacy-javascript.js +2 -2
- package/front_end/third_party/legacy-javascript/package.json +1 -1
- package/front_end/third_party/lighthouse/README.chromium +2 -2
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1983 -2022
- package/front_end/third_party/lighthouse/locales/ar-XB.json +157 -142
- package/front_end/third_party/lighthouse/locales/ar.json +157 -142
- package/front_end/third_party/lighthouse/locales/bg.json +154 -139
- package/front_end/third_party/lighthouse/locales/ca.json +157 -142
- package/front_end/third_party/lighthouse/locales/cs.json +148 -133
- package/front_end/third_party/lighthouse/locales/da.json +153 -138
- package/front_end/third_party/lighthouse/locales/de.json +152 -137
- package/front_end/third_party/lighthouse/locales/el.json +153 -138
- package/front_end/third_party/lighthouse/locales/en-GB.json +160 -145
- package/front_end/third_party/lighthouse/locales/en-US.json +239 -218
- package/front_end/third_party/lighthouse/locales/en-XL.json +239 -218
- package/front_end/third_party/lighthouse/locales/es-419.json +150 -135
- package/front_end/third_party/lighthouse/locales/es.json +149 -134
- package/front_end/third_party/lighthouse/locales/fi.json +151 -136
- package/front_end/third_party/lighthouse/locales/fil.json +154 -139
- package/front_end/third_party/lighthouse/locales/fr.json +150 -135
- package/front_end/third_party/lighthouse/locales/he.json +160 -145
- package/front_end/third_party/lighthouse/locales/hi.json +156 -141
- package/front_end/third_party/lighthouse/locales/hr.json +154 -139
- package/front_end/third_party/lighthouse/locales/hu.json +111 -96
- package/front_end/third_party/lighthouse/locales/id.json +153 -138
- package/front_end/third_party/lighthouse/locales/it.json +153 -138
- package/front_end/third_party/lighthouse/locales/ja.json +150 -135
- package/front_end/third_party/lighthouse/locales/ko.json +42 -27
- package/front_end/third_party/lighthouse/locales/lt.json +152 -137
- package/front_end/third_party/lighthouse/locales/lv.json +93 -78
- package/front_end/third_party/lighthouse/locales/nl.json +149 -134
- package/front_end/third_party/lighthouse/locales/no.json +152 -137
- package/front_end/third_party/lighthouse/locales/pl.json +153 -138
- package/front_end/third_party/lighthouse/locales/pt-PT.json +152 -137
- package/front_end/third_party/lighthouse/locales/pt.json +157 -142
- package/front_end/third_party/lighthouse/locales/ro.json +149 -134
- package/front_end/third_party/lighthouse/locales/ru.json +76 -61
- package/front_end/third_party/lighthouse/locales/sk.json +153 -138
- package/front_end/third_party/lighthouse/locales/sl.json +149 -134
- package/front_end/third_party/lighthouse/locales/sr-Latn.json +151 -136
- package/front_end/third_party/lighthouse/locales/sr.json +151 -136
- package/front_end/third_party/lighthouse/locales/sv.json +152 -137
- package/front_end/third_party/lighthouse/locales/ta.json +156 -141
- package/front_end/third_party/lighthouse/locales/te.json +157 -142
- package/front_end/third_party/lighthouse/locales/th.json +111 -96
- package/front_end/third_party/lighthouse/locales/tr.json +153 -138
- package/front_end/third_party/lighthouse/locales/uk.json +149 -134
- package/front_end/third_party/lighthouse/locales/vi.json +162 -147
- package/front_end/third_party/lighthouse/locales/zh-HK.json +150 -135
- package/front_end/third_party/lighthouse/locales/zh-TW.json +154 -139
- package/front_end/third_party/lighthouse/locales/zh.json +152 -137
- package/front_end/third_party/lighthouse/report/bundle.d.ts +9 -8
- package/front_end/third_party/lighthouse/report/bundle.js +10 -10
- package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +2 -7
- package/front_end/tsconfig.compatibility.json +1 -0
- package/front_end/tsconfig.json +3 -2
- package/front_end/ui/components/dialogs/TypeToAllowDialog.ts +0 -2
- package/front_end/ui/components/dialogs/typeToAllowDialog.css +0 -4
- package/front_end/ui/components/icon_button/fileSourceIcon.css +1 -1
- package/front_end/ui/components/input/textInput.css +1 -1
- package/front_end/ui/components/lists/List.ts +26 -14
- package/front_end/ui/components/menus/menus.ts +0 -2
- package/front_end/ui/components/suggestion_input/SuggestionInput.ts +351 -138
- package/front_end/ui/components/survey_link/surveyLink.css +3 -3
- package/front_end/ui/components/switch/switch.css +6 -6
- package/front_end/ui/components/text_editor/AiCodeCompletionTeaser.ts +2 -3
- package/front_end/ui/components/text_editor/TextEditor.ts +1 -1
- package/front_end/ui/components/tooltips/Tooltip.ts +53 -4
- package/front_end/ui/components/tree_outline/treeOutline.css +7 -7
- package/front_end/ui/helpers/OpenInNewTab.ts +8 -3
- package/front_end/ui/legacy/EmptyWidget.ts +4 -4
- package/front_end/ui/legacy/ForwardedInputEventHandler.ts +2 -2
- package/front_end/ui/legacy/GlassPane.ts +1 -1
- package/front_end/ui/legacy/KeyboardShortcut.ts +7 -7
- package/front_end/ui/legacy/RemoteDebuggingTerminatedScreen.ts +2 -2
- package/front_end/ui/legacy/TabbedPane.ts +198 -66
- package/front_end/ui/legacy/TargetCrashedScreen.ts +2 -2
- package/front_end/ui/legacy/UIUtils.ts +71 -68
- package/front_end/ui/legacy/View.ts +7 -4
- package/front_end/ui/legacy/ViewManager.ts +49 -37
- package/front_end/ui/legacy/Widget.ts +32 -12
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +2 -3
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingUI.ts +8 -8
- package/front_end/ui/legacy/components/inline_editor/BezierUI.ts +8 -9
- package/front_end/ui/legacy/components/inline_editor/LinkSwatch.ts +2 -2
- package/front_end/ui/legacy/components/inline_editor/cssAngleEditor.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/cssAngleSwatch.css +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +45 -11
- package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +10 -12
- package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +102 -29
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +148 -122
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +20 -14
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +1 -1
- package/front_end/ui/legacy/components/source_frame/FontView.ts +29 -5
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +79 -12
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +20 -2
- package/front_end/ui/legacy/components/source_frame/PreviewFactory.ts +2 -2
- package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +6 -10
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +11 -11
- package/front_end/ui/legacy/components/source_frame/fontView.css +7 -0
- package/front_end/ui/legacy/components/source_frame/imageView.css +7 -0
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +14 -3
- package/front_end/ui/legacy/components/utils/Linkifier.ts +126 -2
- package/front_end/ui/legacy/emptyWidget.css +2 -1
- package/front_end/ui/legacy/inspectorCommon.css +3 -3
- package/front_end/ui/legacy/smallBubble.css +1 -1
- package/front_end/ui/legacy/tabbedPane.css +6 -0
- package/front_end/ui/lit/Directives.ts +35 -18
- package/front_end/ui/lit/lit.ts +0 -2
- package/front_end/ui/lit/render.ts +0 -7
- package/front_end/ui/visual_logging/KnownContextValues.ts +5 -0
- package/package.json +1 -1
- package/vpython.toml +8 -0
- package/vpython.toml.uv.lock +3 -0
- package/.agents/skills/review-models-core/SKILL.md +0 -73
- package/.agents/skills/review-tests/SKILL.md +0 -67
- package/.agents/skills/review-ui-widgets/SKILL.md +0 -115
- package/front_end/generated/ARIAProperties.ts +0 -2686
- package/front_end/ui/components/menus/README.md +0 -119
- package/front_end/ui/components/menus/SelectMenu.ts +0 -473
- package/front_end/ui/components/menus/selectMenu.css +0 -54
- package/front_end/ui/components/menus/selectMenuButton.css +0 -108
|
@@ -4,13 +4,11 @@
|
|
|
4
4
|
/* eslint-disable @devtools/no-lit-render-outside-of-view, @devtools/enforce-custom-element-definitions-location */
|
|
5
5
|
|
|
6
6
|
import * as UI from '../../legacy/legacy.js';
|
|
7
|
-
import
|
|
7
|
+
import {AsyncDirective, Directives, html, type LitTemplate, nothing, render} from '../../lit/lit.js';
|
|
8
8
|
import * as VisualLogging from '../../visual_logging/visual_logging.js';
|
|
9
9
|
|
|
10
10
|
import tooltipStyles from './tooltip.css.js';
|
|
11
11
|
|
|
12
|
-
const {html} = Lit;
|
|
13
|
-
|
|
14
12
|
interface ProposedRect {
|
|
15
13
|
left: number;
|
|
16
14
|
top: number;
|
|
@@ -376,7 +374,7 @@ export class Tooltip extends HTMLElement {
|
|
|
376
374
|
this.#setAttributes();
|
|
377
375
|
|
|
378
376
|
// clang-format off
|
|
379
|
-
|
|
377
|
+
render(html`
|
|
380
378
|
<style>${tooltipStyles}</style>
|
|
381
379
|
<!-- Wrapping it into a container, so that the tooltip doesn't disappear when the mouse moves from the anchor to the tooltip. -->
|
|
382
380
|
<div class="container ${this.padding === 'large' ? 'large-padding' : ''}">
|
|
@@ -659,6 +657,57 @@ export class Tooltip extends HTMLElement {
|
|
|
659
657
|
}
|
|
660
658
|
}
|
|
661
659
|
|
|
660
|
+
type IfExpandedContent = LitTemplate|Iterable<LitTemplate>|Promise<LitTemplate|Iterable<LitTemplate>>;
|
|
661
|
+
|
|
662
|
+
class IfExpandedDirective extends AsyncDirective.AsyncDirective {
|
|
663
|
+
readonly #partInfo: {type: AsyncDirective.PartType, startNode: Node};
|
|
664
|
+
#tooltip: Tooltip|null = null;
|
|
665
|
+
#content: IfExpandedContent|(() => IfExpandedContent) = nothing;
|
|
666
|
+
|
|
667
|
+
constructor(partInfo: AsyncDirective.PartInfo) {
|
|
668
|
+
if (partInfo.type !== AsyncDirective.PartType.CHILD) {
|
|
669
|
+
throw new Error('ifExpanded directive must be used in a child node');
|
|
670
|
+
}
|
|
671
|
+
super(partInfo);
|
|
672
|
+
this.#partInfo = partInfo as {type: AsyncDirective.PartType, startNode: Node};
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
#resolveContent(): unknown {
|
|
676
|
+
return Directives.until(typeof this.#content === 'function' ? this.#content() : this.#content);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
#onBeforeToggle = (event: ToggleEvent): void => {
|
|
680
|
+
this.setValue(event.newState === 'open' ? this.#resolveContent() : nothing);
|
|
681
|
+
};
|
|
682
|
+
|
|
683
|
+
render(content: IfExpandedContent|(() => IfExpandedContent)): unknown {
|
|
684
|
+
this.#content = content;
|
|
685
|
+
const startNode = this.#partInfo.startNode;
|
|
686
|
+
const parentElement = startNode instanceof HTMLElement ? startNode : startNode?.parentElement;
|
|
687
|
+
const tooltip = parentElement?.closest('devtools-tooltip') ?? null;
|
|
688
|
+
if (tooltip !== this.#tooltip) {
|
|
689
|
+
this.#tooltip?.removeEventListener('beforetoggle', this.#onBeforeToggle);
|
|
690
|
+
this.#tooltip = tooltip;
|
|
691
|
+
this.#tooltip?.addEventListener('beforetoggle', this.#onBeforeToggle);
|
|
692
|
+
}
|
|
693
|
+
if (!this.#tooltip?.open) {
|
|
694
|
+
return nothing;
|
|
695
|
+
}
|
|
696
|
+
return this.#resolveContent();
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
protected override disconnected(): void {
|
|
700
|
+
this.#tooltip?.removeEventListener('beforetoggle', this.#onBeforeToggle);
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
protected override reconnected(): void {
|
|
704
|
+
this.#tooltip?.addEventListener('beforetoggle', this.#onBeforeToggle);
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
export const ifExpanded: (content: IfExpandedContent|(() => IfExpandedContent)) =>
|
|
709
|
+
AsyncDirective.DirectiveResult<typeof IfExpandedDirective> = AsyncDirective.directive(IfExpandedDirective);
|
|
710
|
+
|
|
662
711
|
customElements.define('devtools-tooltip', Tooltip);
|
|
663
712
|
|
|
664
713
|
declare global {
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
:host {
|
|
8
|
-
--list-group-padding:
|
|
8
|
+
--list-group-padding: var(--sys-size-8);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
li {
|
|
12
|
-
border:
|
|
12
|
+
border: var(--sys-size-2) solid transparent;
|
|
13
13
|
list-style: none;
|
|
14
14
|
text-overflow: ellipsis;
|
|
15
|
-
min-height:
|
|
15
|
+
min-height: var(--sys-size-6);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.compact {
|
|
@@ -35,12 +35,12 @@ li {
|
|
|
35
35
|
user-select: none;
|
|
36
36
|
mask-image: var(--image-file-arrow-collapse);
|
|
37
37
|
background-color: var(--icon-default);
|
|
38
|
-
margin-top: -
|
|
38
|
+
margin-top: calc(-1 * var(--sys-size-2));
|
|
39
39
|
margin-right: 3px;
|
|
40
40
|
content: "";
|
|
41
41
|
text-shadow: none;
|
|
42
|
-
height:
|
|
43
|
-
width:
|
|
42
|
+
height: var(--sys-size-7);
|
|
43
|
+
width: var(--sys-size-7);
|
|
44
44
|
overflow: hidden;
|
|
45
45
|
flex: none;
|
|
46
46
|
}
|
|
@@ -129,6 +129,6 @@ ul[role="tree"]:focus-within [role="treeitem"].selected > .arrow-and-key-wrapper
|
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
ul[role="tree"]:focus-within [role="treeitem"].selected {
|
|
132
|
-
outline: solid
|
|
132
|
+
outline: solid var(--sys-size-1) ButtonText;
|
|
133
133
|
}
|
|
134
134
|
}
|
|
@@ -59,10 +59,13 @@ import * as SDK from '../../core/sdk/sdk.js';
|
|
|
59
59
|
* @param url the URL to open in a new tab.
|
|
60
60
|
* @param allowPrivileged whether to also open URLs with privileged or other non-web-safe schemes. By default,
|
|
61
61
|
* only URLs with web-safe schemes (see `Common.ParsedURL.hasWebSafeScheme`) are opened.
|
|
62
|
+
* @param initiatorId the DevTools frame id or target id of the frame or worker that `url` came from, if any. The
|
|
63
|
+
* browser attributes the navigation to it; without it, the navigation is treated as cross-site. See
|
|
64
|
+
* `InspectorFrontendHostAPI.openInNewTab()`.
|
|
62
65
|
* @throws TypeError if `url` is not a valid URL.
|
|
63
66
|
* @see https://en.wikipedia.org/wiki/UTM_parameters
|
|
64
67
|
*/
|
|
65
|
-
export function openInNewTab(url: URL|string, allowPrivileged?: boolean): void {
|
|
68
|
+
export function openInNewTab(url: URL|string, allowPrivileged?: boolean, initiatorId?: string): void {
|
|
66
69
|
url = new URL(url);
|
|
67
70
|
if (Common.ParsedURL.schemeIs(url, 'javascript:')) {
|
|
68
71
|
return;
|
|
@@ -84,7 +87,8 @@ export function openInNewTab(url: URL|string, allowPrivileged?: boolean): void {
|
|
|
84
87
|
|
|
85
88
|
void rootTarget.targetAgent().invoke_createTarget({url: url.toString()}).then(result => {
|
|
86
89
|
if (result.getError()) {
|
|
87
|
-
Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(Platform.DevToolsPath.urlString`${url}
|
|
90
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(Platform.DevToolsPath.urlString`${url}`,
|
|
91
|
+
initiatorId);
|
|
88
92
|
}
|
|
89
93
|
});
|
|
90
94
|
} else {
|
|
@@ -102,6 +106,7 @@ export function openInNewTab(url: URL|string, allowPrivileged?: boolean): void {
|
|
|
102
106
|
url.searchParams.append('utm_campaign', channel);
|
|
103
107
|
}
|
|
104
108
|
}
|
|
105
|
-
Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(Platform.DevToolsPath.urlString`${url}
|
|
109
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(Platform.DevToolsPath.urlString`${url}`,
|
|
110
|
+
initiatorId);
|
|
106
111
|
}
|
|
107
112
|
}
|
|
@@ -28,7 +28,7 @@ interface ViewInput {
|
|
|
28
28
|
link?: Platform.DevToolsPath.UrlString|null;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
type View = (input: ViewInput, output: undefined, target: HTMLElement) => void;
|
|
31
|
+
type View = (input: ViewInput, output: undefined, target: HTMLElement|DocumentFragment) => void;
|
|
32
32
|
|
|
33
33
|
const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
34
34
|
// clang-format off
|
|
@@ -42,11 +42,11 @@ const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
42
42
|
${input.link ? html`<devtools-link href=${input.link} jslogContext=${'learn-more'}>${i18nString(UIStrings.learnMore)}</devtools-link>` : ''}
|
|
43
43
|
</div>
|
|
44
44
|
<slot></slot>
|
|
45
|
-
</div>`, target, {container: {classes: ['empty-view-scroller']}});
|
|
45
|
+
</div>`, target, {container: {classes: ['empty-widget-container', 'empty-view-scroller']}});
|
|
46
46
|
// clang-format on
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
export class EmptyWidget extends VBox {
|
|
49
|
+
export class EmptyWidget extends VBox<ShadowRoot> {
|
|
50
50
|
#header: string;
|
|
51
51
|
#text: string;
|
|
52
52
|
#link: Platform.DevToolsPath.UrlString|undefined|null;
|
|
@@ -57,7 +57,7 @@ export class EmptyWidget extends VBox {
|
|
|
57
57
|
if (!element && headerOrElement instanceof HTMLElement) {
|
|
58
58
|
element = headerOrElement;
|
|
59
59
|
}
|
|
60
|
-
super(element, {useShadowDom:
|
|
60
|
+
super(element, {useShadowDom: 'pure'});
|
|
61
61
|
this.#header = header;
|
|
62
62
|
this.#text = text;
|
|
63
63
|
this.#link = undefined;
|
|
@@ -16,10 +16,10 @@ import {ForwardedShortcut, ShortcutRegistry} from './ShortcutRegistry.js';
|
|
|
16
16
|
export class ForwardedInputEventHandler {
|
|
17
17
|
constructor() {
|
|
18
18
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(
|
|
19
|
-
Host.InspectorFrontendHostAPI.Events.KeyEventUnhandled, this
|
|
19
|
+
Host.InspectorFrontendHostAPI.Events.KeyEventUnhandled, this.#onKeyEventUnhandled, this);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
async #onKeyEventUnhandled(
|
|
23
23
|
event: Common.EventTarget.EventTargetEvent<Host.InspectorFrontendHostAPI.KeyEventUnhandledEvent>): Promise<void> {
|
|
24
24
|
const {type, key, keyCode, modifiers} = event.data;
|
|
25
25
|
if (type !== 'keydown') {
|
|
@@ -96,7 +96,7 @@ export class KeyboardShortcut {
|
|
|
96
96
|
keyCode = keyCode.charCodeAt(0) - (/^[a-z]/.test(keyCode) ? 32 : 0);
|
|
97
97
|
}
|
|
98
98
|
modifiers = modifiers || Modifiers.None.value;
|
|
99
|
-
return KeyboardShortcut
|
|
99
|
+
return KeyboardShortcut.#makeKeyFromCodeAndModifiers(keyCode, modifiers);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
static makeKeyFromEvent(keyboardEvent: KeyboardEvent): number {
|
|
@@ -117,7 +117,7 @@ export class KeyboardShortcut {
|
|
|
117
117
|
// Use either a real or a synthetic keyCode (for events originating from extensions).
|
|
118
118
|
// @ts-expect-error ExtensionServer.js installs '__keyCode' on some events.
|
|
119
119
|
const keyCode = keyboardEvent.keyCode || keyboardEvent['__keyCode'];
|
|
120
|
-
return KeyboardShortcut
|
|
120
|
+
return KeyboardShortcut.#makeKeyFromCodeAndModifiers(keyCode, modifiers);
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
// This checks if a "control equivalent" key is pressed. For non-mac platforms this means checking
|
|
@@ -166,12 +166,12 @@ export class KeyboardShortcut {
|
|
|
166
166
|
|
|
167
167
|
static shortcutToString(key: string|Key, modifiers?: number): string {
|
|
168
168
|
if (typeof key !== 'string' && KeyboardShortcut.isModifier(key.code)) {
|
|
169
|
-
return KeyboardShortcut
|
|
169
|
+
return KeyboardShortcut.#modifiersToString(modifiers);
|
|
170
170
|
}
|
|
171
|
-
return KeyboardShortcut
|
|
171
|
+
return KeyboardShortcut.#modifiersToString(modifiers) + KeyboardShortcut.#keyName(key);
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
|
|
174
|
+
static #keyName(key: string|Key): string {
|
|
175
175
|
if (typeof key === 'string') {
|
|
176
176
|
return key.toUpperCase();
|
|
177
177
|
}
|
|
@@ -181,7 +181,7 @@ export class KeyboardShortcut {
|
|
|
181
181
|
return key.name[Host.Platform.platform()] || key.name.other || '';
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
|
|
184
|
+
static #makeKeyFromCodeAndModifiers(keyCode: number, modifiers: number|null): number {
|
|
185
185
|
return (keyCode & 255) | ((modifiers || 0) << 8);
|
|
186
186
|
}
|
|
187
187
|
|
|
@@ -198,7 +198,7 @@ export class KeyboardShortcut {
|
|
|
198
198
|
keyCode === Keys.Meta.code;
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
|
|
201
|
+
static #modifiersToString(modifiers: number|undefined): string {
|
|
202
202
|
const isMac = Host.Platform.isMac();
|
|
203
203
|
const m = Modifiers;
|
|
204
204
|
const modifierNames = new Map([
|
|
@@ -46,7 +46,7 @@ interface ViewInput {
|
|
|
46
46
|
onReconnect: () => void;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
type View = (input: ViewInput, output:
|
|
49
|
+
type View = (input: ViewInput, output: undefined, target: HTMLElement) => void;
|
|
50
50
|
|
|
51
51
|
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
52
52
|
// clang-format off
|
|
@@ -76,7 +76,7 @@ export class RemoteDebuggingTerminatedScreen extends VBox {
|
|
|
76
76
|
window.location.reload();
|
|
77
77
|
},
|
|
78
78
|
};
|
|
79
|
-
view(input,
|
|
79
|
+
view(input, undefined, this.contentElement);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
static show(reason: string): void {
|
|
@@ -71,6 +71,7 @@ export interface TabInfo {
|
|
|
71
71
|
title: string;
|
|
72
72
|
view: AnyWidget;
|
|
73
73
|
tabTooltip?: string;
|
|
74
|
+
badge?: string|null;
|
|
74
75
|
isCloseable?: boolean;
|
|
75
76
|
previewFeature?: boolean;
|
|
76
77
|
index?: number;
|
|
@@ -93,7 +94,7 @@ export class TabbedPane extends TabbedPaneBase {
|
|
|
93
94
|
private readonly tabsHistory: TabbedPaneTab[];
|
|
94
95
|
tabsById: Map<string, TabbedPaneTab>;
|
|
95
96
|
private currentTabLocked: boolean;
|
|
96
|
-
|
|
97
|
+
autoSelectFirstItemOnShow: boolean;
|
|
97
98
|
private triggerDropDownTimeout: number|null;
|
|
98
99
|
private dropDownButton: HTMLDivElement;
|
|
99
100
|
private currentDevicePixelRatio: number;
|
|
@@ -237,7 +238,22 @@ export class TabbedPane extends TabbedPaneBase {
|
|
|
237
238
|
this.closeableTabs = closeableTabs;
|
|
238
239
|
}
|
|
239
240
|
|
|
241
|
+
#focusHeader = false;
|
|
242
|
+
|
|
243
|
+
get focusHeader(): boolean {
|
|
244
|
+
return this.#focusHeader;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
set focusHeader(focusHeader: boolean) {
|
|
248
|
+
this.#focusHeader = focusHeader;
|
|
249
|
+
}
|
|
250
|
+
|
|
240
251
|
override focus(): void {
|
|
252
|
+
if (this.#focusHeader) {
|
|
253
|
+
this.performUpdate();
|
|
254
|
+
this.focusSelectedTabHeader();
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
241
257
|
if (this.visibleView) {
|
|
242
258
|
this.visibleView.focus();
|
|
243
259
|
} else {
|
|
@@ -285,7 +301,7 @@ export class TabbedPane extends TabbedPaneBase {
|
|
|
285
301
|
this.#tabs.push(tab);
|
|
286
302
|
}
|
|
287
303
|
this.tabsHistory.push(tab);
|
|
288
|
-
if (this.tabsHistory[0] === tab && this.isShowing()) {
|
|
304
|
+
if (this.tabsHistory[0] === tab && this.isShowing() && this.autoSelectFirstItemOnShow) {
|
|
289
305
|
this.selectTab(tab.id, userGesture);
|
|
290
306
|
}
|
|
291
307
|
this.requestUpdate();
|
|
@@ -1778,9 +1794,63 @@ export interface TabbedPaneTabDelegate {
|
|
|
1778
1794
|
* before and after the title in the header of that tab.
|
|
1779
1795
|
*/
|
|
1780
1796
|
export class TabbedPaneElement extends WidgetElement<TabbedPane> {
|
|
1797
|
+
static readonly observedAttributes: string[] = ['vertical', 'focus-header', 'selected-tab'];
|
|
1798
|
+
|
|
1781
1799
|
#closeableTabs = false;
|
|
1782
1800
|
#allowTabReorder = false;
|
|
1783
1801
|
#automaticReorder = false;
|
|
1802
|
+
#vertical = false;
|
|
1803
|
+
#focusHeader = false;
|
|
1804
|
+
#selectedTab?: string;
|
|
1805
|
+
|
|
1806
|
+
get vertical(): boolean {
|
|
1807
|
+
return this.#vertical;
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
set vertical(vertical: boolean) {
|
|
1811
|
+
if (this.#vertical === vertical) {
|
|
1812
|
+
return;
|
|
1813
|
+
}
|
|
1814
|
+
this.#vertical = vertical;
|
|
1815
|
+
if (vertical) {
|
|
1816
|
+
this.getWidget()?.makeVerticalTabLayout();
|
|
1817
|
+
}
|
|
1818
|
+
}
|
|
1819
|
+
|
|
1820
|
+
get focusHeader(): boolean {
|
|
1821
|
+
return this.#focusHeader;
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
set focusHeader(focusHeader: boolean) {
|
|
1825
|
+
this.#focusHeader = focusHeader;
|
|
1826
|
+
const widget = this.getWidget();
|
|
1827
|
+
if (widget) {
|
|
1828
|
+
widget.focusHeader = focusHeader;
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
get selectedTab(): string|null {
|
|
1833
|
+
return this.getWidget()?.selectedTabId ?? this.#selectedTab ?? null;
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
set selectedTab(tabId: string|null) {
|
|
1837
|
+
this.#selectedTab = tabId ?? undefined;
|
|
1838
|
+
const widget = this.getWidget();
|
|
1839
|
+
if (widget && tabId) {
|
|
1840
|
+
this.#updateTabs(widget);
|
|
1841
|
+
widget.selectTab(tabId);
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1845
|
+
override controlsChildWidget(child: HTMLElement): boolean {
|
|
1846
|
+
return child.id !== '' && !child.hasAttribute('slot') && !child.classList.contains('tabbed-pane-header') &&
|
|
1847
|
+
!child.classList.contains('tabbed-pane-content');
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
override focus(): void {
|
|
1851
|
+
this.#updateTabs();
|
|
1852
|
+
super.focus();
|
|
1853
|
+
}
|
|
1784
1854
|
|
|
1785
1855
|
set closeableTabs(closeable: boolean) {
|
|
1786
1856
|
this.#closeableTabs = closeable;
|
|
@@ -1815,6 +1885,8 @@ export class TabbedPaneElement extends WidgetElement<TabbedPane> {
|
|
|
1815
1885
|
#placeholderElement?: Element|LitTemplate;
|
|
1816
1886
|
#headerJslog?: string;
|
|
1817
1887
|
#managedTabIds = new Set<string>();
|
|
1888
|
+
#tabBadges = new Map<string, string|null>();
|
|
1889
|
+
#updatingTabs = false;
|
|
1818
1890
|
set placeholder(element: Element|LitTemplate) {
|
|
1819
1891
|
this.#placeholderElement = element;
|
|
1820
1892
|
this.getWidget()?.setPlaceholderElement(element);
|
|
@@ -1833,6 +1905,10 @@ export class TabbedPaneElement extends WidgetElement<TabbedPane> {
|
|
|
1833
1905
|
registerWidgetConfig(
|
|
1834
1906
|
this, widgetConfig(element => {
|
|
1835
1907
|
const widget = new TabbedPane(element as TabbedPaneElement);
|
|
1908
|
+
if (this.#vertical) {
|
|
1909
|
+
widget.makeVerticalTabLayout();
|
|
1910
|
+
}
|
|
1911
|
+
widget.focusHeader = this.#focusHeader;
|
|
1836
1912
|
widget.setCloseableTabs(this.#closeableTabs);
|
|
1837
1913
|
widget.setAllowTabReorder(this.#allowTabReorder, this.#automaticReorder);
|
|
1838
1914
|
if (this.#delegate) {
|
|
@@ -1845,17 +1921,33 @@ export class TabbedPaneElement extends WidgetElement<TabbedPane> {
|
|
|
1845
1921
|
if (slot) {
|
|
1846
1922
|
slot.addEventListener('slotchange', () => this.#syncTabs());
|
|
1847
1923
|
}
|
|
1924
|
+
widget.addEventListener(Events.TabInvoked, event => {
|
|
1925
|
+
this.dispatchEvent(new CustomEvent('tabinvoked', {
|
|
1926
|
+
detail: {
|
|
1927
|
+
tabId: event.data.tabId,
|
|
1928
|
+
prevTabId: event.data.prevTabId,
|
|
1929
|
+
isUserGesture: event.data.isUserGesture,
|
|
1930
|
+
},
|
|
1931
|
+
}));
|
|
1932
|
+
});
|
|
1848
1933
|
widget.addEventListener(Events.TabSelected, event => {
|
|
1934
|
+
if (!this.#updatingTabs && this.#selectedTab !== undefined && widget.selectedTabId !== null) {
|
|
1935
|
+
this.#selectedTab = widget.selectedTabId;
|
|
1936
|
+
}
|
|
1849
1937
|
const nodes = this.#getTabNodes(widget);
|
|
1850
1938
|
for (const child of nodes) {
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
child.removeAttribute('selected');
|
|
1939
|
+
const isSelected = child.id === widget.selectedTabId;
|
|
1940
|
+
if (isSelected !== child.hasAttribute('selected')) {
|
|
1941
|
+
child.toggleAttribute('selected', isSelected);
|
|
1855
1942
|
}
|
|
1856
1943
|
}
|
|
1857
|
-
this.dispatchEvent(new CustomEvent(
|
|
1858
|
-
|
|
1944
|
+
this.dispatchEvent(new CustomEvent('select', {
|
|
1945
|
+
detail: {
|
|
1946
|
+
tabId: widget.selectedTabId,
|
|
1947
|
+
prevTabId: event.data?.prevTabId,
|
|
1948
|
+
isUserGesture: event.data?.isUserGesture,
|
|
1949
|
+
},
|
|
1950
|
+
}));
|
|
1859
1951
|
});
|
|
1860
1952
|
widget.addEventListener(Events.TabClosed, event => {
|
|
1861
1953
|
this.dispatchEvent(
|
|
@@ -1873,6 +1965,21 @@ export class TabbedPaneElement extends WidgetElement<TabbedPane> {
|
|
|
1873
1965
|
}));
|
|
1874
1966
|
}
|
|
1875
1967
|
|
|
1968
|
+
attributeChangedCallback(name: string, _oldValue: string|null, newValue: string|null): void {
|
|
1969
|
+
if (name === 'vertical') {
|
|
1970
|
+
this.vertical = newValue !== null;
|
|
1971
|
+
} else if (name === 'focus-header') {
|
|
1972
|
+
this.focusHeader = newValue !== null;
|
|
1973
|
+
} else if (name === 'selected-tab') {
|
|
1974
|
+
this.selectedTab = newValue;
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
override connectedCallback(): void {
|
|
1979
|
+
super.connectedCallback();
|
|
1980
|
+
this.#syncTabs();
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1876
1983
|
override disconnectedCallback(): void {
|
|
1877
1984
|
super.disconnectedCallback();
|
|
1878
1985
|
this.#tabObserver.disconnect();
|
|
@@ -1896,6 +2003,7 @@ export class TabbedPaneElement extends WidgetElement<TabbedPane> {
|
|
|
1896
2003
|
'label',
|
|
1897
2004
|
'title',
|
|
1898
2005
|
'tab-tooltip',
|
|
2006
|
+
'badge',
|
|
1899
2007
|
'jslogcontext',
|
|
1900
2008
|
'selected',
|
|
1901
2009
|
'disabled',
|
|
@@ -1913,76 +2021,100 @@ export class TabbedPaneElement extends WidgetElement<TabbedPane> {
|
|
|
1913
2021
|
}
|
|
1914
2022
|
|
|
1915
2023
|
#updateTabs(widget = this.getWidget()): void {
|
|
1916
|
-
if (!widget) {
|
|
2024
|
+
if (!widget || this.#updatingTabs) {
|
|
1917
2025
|
return;
|
|
1918
2026
|
}
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
const
|
|
1923
|
-
const
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
2027
|
+
this.#updatingTabs = true;
|
|
2028
|
+
try {
|
|
2029
|
+
const tabs: TabInfo[] = [];
|
|
2030
|
+
const nodes = this.#getTabNodes(widget);
|
|
2031
|
+
for (const child of nodes) {
|
|
2032
|
+
const id = child.id;
|
|
2033
|
+
const title = child.getAttribute('label') || child.getAttribute('title') || '';
|
|
2034
|
+
const tabTooltip = child.getAttribute('tab-tooltip') ?? undefined;
|
|
2035
|
+
const badge = child.getAttribute('badge');
|
|
2036
|
+
const jslogContext = child.getAttribute('jslogcontext') || undefined;
|
|
2037
|
+
const selected = this.#selectedTab !== undefined ? id === this.#selectedTab : child.hasAttribute('selected');
|
|
2038
|
+
const enabled = !child.hasAttribute('disabled');
|
|
2039
|
+
const isCloseable =
|
|
2040
|
+
child.hasAttribute('closeable') ? true : (child.hasAttribute('uncloseable') ? false : undefined);
|
|
2041
|
+
const view = Widget.getOrCreateWidget(child as HTMLElement);
|
|
2042
|
+
view.setHideOnDetach();
|
|
2043
|
+
if (widget.selectedTabId !== id) {
|
|
2044
|
+
child.classList.add('hidden');
|
|
2045
|
+
}
|
|
2046
|
+
tabs.push({
|
|
2047
|
+
id,
|
|
2048
|
+
title,
|
|
2049
|
+
view,
|
|
2050
|
+
tabTooltip,
|
|
2051
|
+
badge,
|
|
2052
|
+
jslogContext,
|
|
2053
|
+
selected,
|
|
2054
|
+
enabled,
|
|
2055
|
+
isCloseable,
|
|
2056
|
+
});
|
|
1934
2057
|
}
|
|
1935
|
-
tabs.push({
|
|
1936
|
-
id,
|
|
1937
|
-
title,
|
|
1938
|
-
view,
|
|
1939
|
-
tabTooltip,
|
|
1940
|
-
jslogContext,
|
|
1941
|
-
selected,
|
|
1942
|
-
enabled,
|
|
1943
|
-
isCloseable,
|
|
1944
|
-
});
|
|
1945
|
-
}
|
|
1946
2058
|
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
2059
|
+
const newIds = new Set(tabs.map(tab => tab.id));
|
|
2060
|
+
for (const id of this.#managedTabIds) {
|
|
2061
|
+
if (!newIds.has(id)) {
|
|
2062
|
+
widget.closeTab(id);
|
|
2063
|
+
this.#tabBadges.delete(id);
|
|
2064
|
+
}
|
|
1951
2065
|
}
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
widget.
|
|
1960
|
-
if (
|
|
1961
|
-
|
|
2066
|
+
this.#managedTabIds = newIds;
|
|
2067
|
+
const autoSelect = widget.autoSelectFirstItemOnShow;
|
|
2068
|
+
if (tabs.some(tab => tab.selected)) {
|
|
2069
|
+
widget.setAutoSelectFirstItemOnShow(false);
|
|
2070
|
+
}
|
|
2071
|
+
let index = 0;
|
|
2072
|
+
for (const tab of tabs) {
|
|
2073
|
+
const existingTab = widget.tabsById.get(tab.id);
|
|
2074
|
+
if (existingTab) {
|
|
2075
|
+
widget.changeTabView(tab.id, tab.view);
|
|
2076
|
+
widget.changeTabTitle(tab.id, tab.title, tab.tabTooltip);
|
|
2077
|
+
if (tab.jslogContext !== undefined) {
|
|
2078
|
+
existingTab.jslogContext = tab.jslogContext;
|
|
2079
|
+
}
|
|
2080
|
+
if (tab.isCloseable !== undefined) {
|
|
2081
|
+
existingTab.closeable = tab.isCloseable;
|
|
2082
|
+
}
|
|
2083
|
+
if (tab.previewFeature !== undefined) {
|
|
2084
|
+
existingTab.previewFeature = tab.previewFeature;
|
|
2085
|
+
}
|
|
2086
|
+
const currentIndex = widget.tabIndex(tab.id);
|
|
2087
|
+
if (currentIndex !== index) {
|
|
2088
|
+
widget.insertBefore(existingTab, index);
|
|
2089
|
+
}
|
|
2090
|
+
} else {
|
|
2091
|
+
widget.appendTab(tab.id, tab.title, tab.view, tab.tabTooltip, /* userGesture=*/ false, tab.isCloseable,
|
|
2092
|
+
tab.previewFeature, index, tab.jslogContext);
|
|
1962
2093
|
}
|
|
1963
|
-
|
|
1964
|
-
|
|
2094
|
+
const badge = tab.badge ?? null;
|
|
2095
|
+
if (this.#tabBadges.get(tab.id) !== badge && (badge !== null || this.#tabBadges.has(tab.id))) {
|
|
2096
|
+
this.#tabBadges.set(tab.id, badge);
|
|
2097
|
+
widget.setBadge(tab.id, badge);
|
|
1965
2098
|
}
|
|
1966
|
-
if (tab.
|
|
1967
|
-
|
|
2099
|
+
if (tab.enabled !== undefined) {
|
|
2100
|
+
widget.setTabEnabled(tab.id, tab.enabled);
|
|
1968
2101
|
}
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
widget.insertBefore(existingTab, index);
|
|
2102
|
+
if (tab.selected) {
|
|
2103
|
+
widget.selectTab(tab.id);
|
|
1972
2104
|
}
|
|
1973
|
-
|
|
1974
|
-
widget.appendTab(tab.id, tab.title, tab.view, tab.tabTooltip, /* userGesture=*/ false, tab.isCloseable,
|
|
1975
|
-
tab.previewFeature, index, tab.jslogContext);
|
|
1976
|
-
}
|
|
1977
|
-
if (tab.enabled !== undefined) {
|
|
1978
|
-
widget.setTabEnabled(tab.id, tab.enabled);
|
|
1979
|
-
}
|
|
1980
|
-
if (tab.selected) {
|
|
1981
|
-
widget.selectTab(tab.id);
|
|
2105
|
+
++index;
|
|
1982
2106
|
}
|
|
1983
|
-
|
|
2107
|
+
widget.setAutoSelectFirstItemOnShow(autoSelect);
|
|
2108
|
+
} finally {
|
|
2109
|
+
this.#updatingTabs = false;
|
|
1984
2110
|
}
|
|
1985
2111
|
}
|
|
1986
2112
|
}
|
|
1987
2113
|
|
|
1988
2114
|
customElements.define('devtools-tabbed-pane', TabbedPaneElement);
|
|
2115
|
+
|
|
2116
|
+
declare global {
|
|
2117
|
+
interface HTMLElementTagNameMap {
|
|
2118
|
+
'devtools-tabbed-pane': TabbedPaneElement;
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
@@ -21,7 +21,7 @@ const UIStrings = {
|
|
|
21
21
|
const str_ = i18n.i18n.registerUIStrings('ui/legacy/TargetCrashedScreen.ts', UIStrings);
|
|
22
22
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
23
23
|
|
|
24
|
-
type View = (input: object, output:
|
|
24
|
+
type View = (input: object, output: undefined, target: HTMLElement) => void;
|
|
25
25
|
|
|
26
26
|
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
27
27
|
// clang-format off
|
|
@@ -37,7 +37,7 @@ export class TargetCrashedScreen extends VBox {
|
|
|
37
37
|
private readonly hideCallback: () => void;
|
|
38
38
|
constructor(hideCallback: () => void, view: View = DEFAULT_VIEW) {
|
|
39
39
|
super({useShadowDom: true});
|
|
40
|
-
view({},
|
|
40
|
+
view({}, undefined, this.contentElement);
|
|
41
41
|
this.hideCallback = hideCallback;
|
|
42
42
|
}
|
|
43
43
|
|