chrome-devtools-frontend 1.0.955092 → 1.0.956812

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.
Files changed (356) hide show
  1. package/.eslintrc.js +1 -0
  2. package/AUTHORS +1 -0
  3. package/config/gni/devtools_grd_files.gni +0 -2
  4. package/config/owner/COMMON_OWNERS +2 -2
  5. package/front_end/.eslintrc.js +1 -11
  6. package/front_end/Images/generate-css-vars.js +2 -2
  7. package/front_end/core/common/Console.ts +1 -1
  8. package/front_end/core/common/ParsedURL.ts +35 -2
  9. package/front_end/core/common/ResolverBase.ts +1 -1
  10. package/front_end/core/common/Settings.ts +1 -1
  11. package/front_end/core/common/Throttler.ts +1 -1
  12. package/front_end/core/common/Worker.ts +4 -4
  13. package/front_end/core/host/InspectorFrontendHost.ts +3 -2
  14. package/front_end/core/host/ResourceLoader.ts +2 -2
  15. package/front_end/core/i18n/DevToolsLocale.ts +0 -2
  16. package/front_end/core/i18n/i18nImpl.ts +2 -5
  17. package/front_end/core/i18n/locales/en-US.json +3 -3
  18. package/front_end/core/i18n/locales/en-XL.json +3 -3
  19. package/front_end/core/root/Runtime.ts +0 -72
  20. package/front_end/core/root/root-legacy.ts +0 -2
  21. package/front_end/core/sdk/AccessibilityModel.ts +1 -1
  22. package/front_end/core/sdk/CPUProfilerModel.ts +2 -2
  23. package/front_end/core/sdk/CPUThrottlingManager.ts +2 -2
  24. package/front_end/core/sdk/CSSModel.ts +7 -7
  25. package/front_end/core/sdk/CSSProperty.ts +1 -1
  26. package/front_end/core/sdk/CSSStyleDeclaration.ts +1 -1
  27. package/front_end/core/sdk/ChildTargetManager.ts +6 -6
  28. package/front_end/core/sdk/Connections.ts +2 -2
  29. package/front_end/core/sdk/ConsoleModel.ts +1 -1
  30. package/front_end/core/sdk/DOMDebuggerModel.ts +16 -15
  31. package/front_end/core/sdk/DOMModel.ts +17 -17
  32. package/front_end/core/sdk/DebuggerModel.ts +24 -24
  33. package/front_end/core/sdk/EmulationModel.ts +16 -16
  34. package/front_end/core/sdk/EventBreakpointsModel.ts +2 -2
  35. package/front_end/core/sdk/IsolateManager.ts +2 -2
  36. package/front_end/core/sdk/IssuesModel.ts +1 -1
  37. package/front_end/core/sdk/LogModel.ts +3 -3
  38. package/front_end/core/sdk/NetworkManager.ts +25 -25
  39. package/front_end/core/sdk/OverlayModel.ts +23 -23
  40. package/front_end/core/sdk/PageResourceLoader.ts +1 -1
  41. package/front_end/core/sdk/PaintProfiler.ts +1 -1
  42. package/front_end/core/sdk/RemoteObject.ts +2 -2
  43. package/front_end/core/sdk/Resource.ts +2 -2
  44. package/front_end/core/sdk/ResourceTreeModel.ts +5 -5
  45. package/front_end/core/sdk/RuntimeModel.ts +11 -11
  46. package/front_end/core/sdk/ScreenCaptureModel.ts +3 -3
  47. package/front_end/core/sdk/ServiceWorkerCacheModel.ts +7 -7
  48. package/front_end/core/sdk/ServiceWorkerManager.ts +4 -4
  49. package/front_end/core/sdk/SourceMapManager.ts +1 -1
  50. package/front_end/core/sdk/TargetManager.ts +2 -2
  51. package/front_end/core/sdk/TracingManager.ts +1 -1
  52. package/front_end/entrypoints/formatter_worker/FormatterActions.ts +10 -0
  53. package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +3 -4
  54. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +1 -1
  55. package/front_end/entrypoints/inspector_main/InspectorMain.ts +4 -4
  56. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +1 -1
  57. package/front_end/entrypoints/js_app/js_app.ts +2 -2
  58. package/front_end/entrypoints/lighthouse_worker/LighthouseService.ts +4 -7
  59. package/front_end/entrypoints/main/MainImpl.ts +32 -24
  60. package/front_end/entrypoints/main/main-meta.ts +1 -1
  61. package/front_end/entrypoints/node_app/NodeMain.ts +6 -6
  62. package/front_end/entrypoints/worker_app/WorkerMain.ts +1 -1
  63. package/front_end/generated/protocol.d.ts +1 -0
  64. package/front_end/global_typings/global_defs.d.ts +0 -1
  65. package/front_end/models/bindings/BreakpointManager.ts +21 -23
  66. package/front_end/models/bindings/CSSWorkspaceBinding.ts +3 -3
  67. package/front_end/models/bindings/CompilerScriptMapping.ts +1 -1
  68. package/front_end/models/bindings/ContentProviderBasedProject.ts +1 -1
  69. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +2 -2
  70. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +3 -3
  71. package/front_end/models/bindings/DefaultScriptMapping.ts +1 -1
  72. package/front_end/models/bindings/FileUtils.ts +5 -5
  73. package/front_end/models/bindings/IgnoreListManager.ts +4 -4
  74. package/front_end/models/bindings/LiveLocation.ts +9 -0
  75. package/front_end/models/bindings/PresentationConsoleMessageHelper.ts +2 -1
  76. package/front_end/models/bindings/ResourceMapping.ts +1 -1
  77. package/front_end/models/bindings/ResourceScriptMapping.ts +9 -9
  78. package/front_end/models/bindings/StylesSourceMapping.ts +3 -3
  79. package/front_end/models/bindings/TempFile.ts +1 -1
  80. package/front_end/models/emulation/DeviceModeModel.ts +5 -5
  81. package/front_end/models/emulation/EmulatedDevices.ts +1 -1
  82. package/front_end/models/extensions/ExtensionPanel.ts +1 -1
  83. package/front_end/models/extensions/ExtensionServer.ts +9 -30
  84. package/front_end/models/formatter/FormatterWorkerPool.ts +2 -12
  85. package/front_end/models/formatter/ScriptFormatter.ts +3 -3
  86. package/front_end/models/formatter/SourceFormatter.ts +2 -2
  87. package/front_end/models/issues_manager/ContrastCheckTrigger.ts +1 -1
  88. package/front_end/models/issues_manager/DeprecationIssue.ts +7 -7
  89. package/front_end/models/issues_manager/SourceFrameIssuesManager.ts +3 -3
  90. package/front_end/models/persistence/Automapping.ts +3 -3
  91. package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +3 -3
  92. package/front_end/models/persistence/IsolatedFileSystem.ts +1 -1
  93. package/front_end/models/persistence/IsolatedFileSystemManager.ts +2 -2
  94. package/front_end/models/persistence/NetworkPersistenceManager.ts +11 -11
  95. package/front_end/models/persistence/PersistenceActions.ts +3 -3
  96. package/front_end/models/persistence/PersistenceImpl.ts +2 -2
  97. package/front_end/models/persistence/WorkspaceSettingsTab.ts +1 -1
  98. package/front_end/models/workspace/UISourceCode.ts +2 -2
  99. package/front_end/models/workspace_diff/WorkspaceDiff.ts +2 -2
  100. package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +4 -4
  101. package/front_end/panels/accessibility/AccessibilityNodeView.ts +3 -3
  102. package/front_end/panels/accessibility/AccessibilitySidebarView.ts +7 -7
  103. package/front_end/panels/animation/AnimationModel.ts +6 -6
  104. package/front_end/panels/animation/AnimationTimeline.ts +3 -3
  105. package/front_end/panels/animation/AnimationUI.ts +3 -3
  106. package/front_end/panels/application/AppManifestView.ts +4 -4
  107. package/front_end/panels/application/ApplicationPanelCacheSection.ts +3 -3
  108. package/front_end/panels/application/ApplicationPanelSidebar.ts +15 -15
  109. package/front_end/panels/application/BackgroundServiceModel.ts +3 -3
  110. package/front_end/panels/application/BackgroundServiceView.ts +3 -3
  111. package/front_end/panels/application/CookieItemsView.ts +5 -5
  112. package/front_end/panels/application/DOMStorageItemsView.ts +4 -4
  113. package/front_end/panels/application/DOMStorageModel.ts +4 -4
  114. package/front_end/panels/application/DatabaseModel.ts +2 -2
  115. package/front_end/panels/application/DatabaseQueryView.ts +2 -2
  116. package/front_end/panels/application/DatabaseTableView.ts +1 -1
  117. package/front_end/panels/application/IndexedDBModel.ts +11 -11
  118. package/front_end/panels/application/IndexedDBViews.ts +5 -5
  119. package/front_end/panels/application/OpenedWindowDetailsView.ts +4 -4
  120. package/front_end/panels/application/ReportingApiView.ts +1 -1
  121. package/front_end/panels/application/ResourcesPanel.ts +2 -2
  122. package/front_end/panels/application/ServiceWorkerCacheViews.ts +7 -7
  123. package/front_end/panels/application/ServiceWorkersView.ts +15 -15
  124. package/front_end/panels/application/StorageView.ts +5 -5
  125. package/front_end/panels/application/TrustTokensTreeElement.ts +1 -1
  126. package/front_end/panels/application/components/BackForwardCacheStrings.ts +5 -1
  127. package/front_end/panels/application/components/BackForwardCacheView.ts +4 -4
  128. package/front_end/panels/application/components/FrameDetailsView.ts +3 -3
  129. package/front_end/panels/application/components/PermissionsPolicySection.ts +2 -2
  130. package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +1 -1
  131. package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +8 -7
  132. package/front_end/panels/browser_debugger/ObjectEventListenersSidebarPane.ts +1 -1
  133. package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +4 -4
  134. package/front_end/panels/changes/ChangesView.ts +4 -4
  135. package/front_end/panels/console/ConsoleContextSelector.ts +1 -1
  136. package/front_end/panels/console/ConsolePinPane.ts +4 -4
  137. package/front_end/panels/console/ConsolePrompt.ts +4 -4
  138. package/front_end/panels/console/ConsoleSidebar.ts +9 -9
  139. package/front_end/panels/console/ConsoleView.ts +6 -6
  140. package/front_end/panels/console/ConsoleViewMessage.ts +8 -7
  141. package/front_end/panels/console_counters/WarningErrorCounter.ts +2 -2
  142. package/front_end/panels/coverage/CoverageListView.ts +3 -3
  143. package/front_end/panels/coverage/CoverageModel.ts +3 -3
  144. package/front_end/panels/coverage/CoverageView.ts +6 -6
  145. package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +3 -3
  146. package/front_end/panels/css_overview/CSSOverviewModel.ts +2 -2
  147. package/front_end/panels/css_overview/CSSOverviewPanel.ts +1 -1
  148. package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +1 -1
  149. package/front_end/panels/developer_resources/DeveloperResourcesView.ts +1 -1
  150. package/front_end/panels/elements/AccessibilityTreeView.ts +5 -5
  151. package/front_end/panels/elements/ClassesPaneWidget.ts +1 -1
  152. package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +10 -10
  153. package/front_end/panels/elements/ComputedStyleWidget.ts +2 -2
  154. package/front_end/panels/elements/DOMLinkifier.ts +2 -2
  155. package/front_end/panels/elements/ElementsPanel.ts +20 -20
  156. package/front_end/panels/elements/ElementsSidebarPane.ts +1 -1
  157. package/front_end/panels/elements/ElementsTreeElement.ts +14 -13
  158. package/front_end/panels/elements/ElementsTreeElementHighlighter.ts +1 -1
  159. package/front_end/panels/elements/ElementsTreeOutline.ts +4 -4
  160. package/front_end/panels/elements/InspectElementModeController.ts +3 -3
  161. package/front_end/panels/elements/LayoutSidebarPane.ts +2 -2
  162. package/front_end/panels/elements/MetricsSidebarPane.ts +2 -2
  163. package/front_end/panels/elements/StylePropertyHighlighter.ts +1 -1
  164. package/front_end/panels/elements/StylePropertyTreeElement.ts +16 -16
  165. package/front_end/panels/elements/StylesSidebarPane.ts +15 -15
  166. package/front_end/panels/elements/components/AccessibilityTreeNode.ts +1 -1
  167. package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +8 -8
  168. package/front_end/panels/elements/components/LayoutPane.ts +1 -1
  169. package/front_end/panels/elements/elementsPanel.css +1 -0
  170. package/front_end/panels/emulation/AdvancedApp.ts +2 -2
  171. package/front_end/panels/emulation/DeviceModeToolbar.ts +1 -1
  172. package/front_end/panels/emulation/DeviceModeView.ts +2 -2
  173. package/front_end/panels/emulation/DeviceModeWrapper.ts +4 -4
  174. package/front_end/panels/emulation/MediaQueryInspector.ts +3 -3
  175. package/front_end/panels/event_listeners/EventListenersView.ts +3 -3
  176. package/front_end/panels/input/InputModel.ts +2 -2
  177. package/front_end/panels/input/InputTimeline.ts +6 -6
  178. package/front_end/panels/issues/AffectedCookiesView.ts +2 -2
  179. package/front_end/panels/issues/AffectedDirectivesView.ts +1 -1
  180. package/front_end/panels/issues/AffectedElementsView.ts +1 -1
  181. package/front_end/panels/issues/AffectedResourcesView.ts +2 -2
  182. package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +1 -1
  183. package/front_end/panels/issues/ComboBoxOfCheckBoxes.ts +1 -1
  184. package/front_end/panels/issues/IssueView.ts +1 -1
  185. package/front_end/panels/issues/components/HideIssuesMenu.ts +1 -1
  186. package/front_end/panels/layer_viewer/LayerDetailsView.ts +1 -1
  187. package/front_end/panels/layer_viewer/LayerViewHost.ts +1 -1
  188. package/front_end/panels/layer_viewer/Layers3DView.ts +7 -7
  189. package/front_end/panels/layer_viewer/PaintProfilerView.ts +1 -1
  190. package/front_end/panels/layers/LayerPaintProfilerView.ts +3 -3
  191. package/front_end/panels/layers/LayerTreeModel.ts +4 -4
  192. package/front_end/panels/layers/LayersPanel.ts +4 -4
  193. package/front_end/panels/lighthouse/LighthouseController.ts +1 -1
  194. package/front_end/panels/lighthouse/LighthousePanel.ts +5 -5
  195. package/front_end/panels/lighthouse/LighthouseProtocolService.ts +1 -1
  196. package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +1 -1
  197. package/front_end/panels/media/MediaModel.ts +1 -1
  198. package/front_end/panels/media/PlayerListView.ts +1 -1
  199. package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +1 -1
  200. package/front_end/panels/network/BinaryResourceView.ts +1 -1
  201. package/front_end/panels/network/BlockedURLsPane.ts +5 -5
  202. package/front_end/panels/network/NetworkDataGridNode.ts +1 -1
  203. package/front_end/panels/network/NetworkItemView.ts +2 -2
  204. package/front_end/panels/network/NetworkLogView.ts +4 -4
  205. package/front_end/panels/network/NetworkLogViewColumns.ts +1 -1
  206. package/front_end/panels/network/NetworkPanel.ts +8 -8
  207. package/front_end/panels/network/NetworkTimeCalculator.ts +1 -1
  208. package/front_end/panels/network/RequestHeadersView.ts +4 -3
  209. package/front_end/panels/network/RequestPayloadView.ts +8 -8
  210. package/front_end/panels/network/RequestPreviewView.ts +1 -1
  211. package/front_end/panels/network/RequestResponseView.ts +2 -2
  212. package/front_end/panels/network/ResourceWebSocketFrameView.ts +1 -1
  213. package/front_end/panels/performance_monitor/PerformanceMonitor.ts +4 -3
  214. package/front_end/panels/profiler/CPUProfileView.ts +4 -4
  215. package/front_end/panels/profiler/HeapProfileView.ts +6 -6
  216. package/front_end/panels/profiler/HeapProfilerPanel.ts +2 -2
  217. package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +10 -10
  218. package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +9 -8
  219. package/front_end/panels/profiler/HeapSnapshotView.ts +24 -24
  220. package/front_end/panels/profiler/LiveHeapProfileView.ts +4 -4
  221. package/front_end/panels/profiler/ProfileSidebarTreeElement.ts +1 -1
  222. package/front_end/panels/profiler/ProfileView.ts +3 -3
  223. package/front_end/panels/profiler/ProfilesPanel.ts +3 -3
  224. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +3 -3
  225. package/front_end/panels/screencast/InputModel.ts +3 -3
  226. package/front_end/panels/screencast/ScreencastView.ts +10 -10
  227. package/front_end/panels/search/SearchResultsPane.ts +1 -1
  228. package/front_end/panels/search/SearchView.ts +2 -2
  229. package/front_end/panels/security/SecurityModel.ts +1 -1
  230. package/front_end/panels/security/SecurityPanel.ts +2 -2
  231. package/front_end/panels/sensors/SensorsView.ts +3 -2
  232. package/front_end/panels/settings/SettingsScreen.ts +5 -5
  233. package/front_end/panels/settings/components/SyncSection.ts +1 -1
  234. package/front_end/panels/snippets/SnippetsQuickOpen.ts +1 -1
  235. package/front_end/panels/sources/BreakpointEditDialog.ts +2 -2
  236. package/front_end/panels/sources/CallStackSidebarPane.ts +4 -4
  237. package/front_end/panels/sources/CoveragePlugin.ts +3 -3
  238. package/front_end/panels/sources/DebuggerPlugin.ts +12 -12
  239. package/front_end/panels/sources/GoToLineQuickOpen.ts +1 -1
  240. package/front_end/panels/sources/InplaceFormatterEditorAction.ts +3 -3
  241. package/front_end/panels/sources/JavaScriptBreakpointsSidebarPane.ts +3 -3
  242. package/front_end/panels/sources/NavigatorView.ts +6 -6
  243. package/front_end/panels/sources/OpenFileQuickOpen.ts +2 -2
  244. package/front_end/panels/sources/OutlineQuickOpen.ts +1 -1
  245. package/front_end/panels/sources/ScopeChainSidebarPane.ts +3 -3
  246. package/front_end/panels/sources/ScriptFormatterEditorAction.ts +3 -3
  247. package/front_end/panels/sources/SearchSourcesView.ts +2 -2
  248. package/front_end/panels/sources/SourcesNavigator.ts +9 -9
  249. package/front_end/panels/sources/SourcesPanel.ts +28 -25
  250. package/front_end/panels/sources/SourcesSearchScope.ts +2 -2
  251. package/front_end/panels/sources/SourcesView.ts +4 -4
  252. package/front_end/panels/sources/TabbedEditorContainer.ts +1 -1
  253. package/front_end/panels/sources/UISourceCodeFrame.ts +2 -2
  254. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +4 -4
  255. package/front_end/panels/timeline/EventsTimelineTreeView.ts +1 -1
  256. package/front_end/panels/timeline/TimelineController.ts +1 -1
  257. package/front_end/panels/timeline/TimelineDetailsView.ts +2 -2
  258. package/front_end/panels/timeline/TimelineEventOverview.ts +2 -2
  259. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +22 -5
  260. package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +9 -6
  261. package/front_end/panels/timeline/TimelineHistoryManager.ts +1 -1
  262. package/front_end/panels/timeline/TimelineLayersView.ts +1 -1
  263. package/front_end/panels/timeline/TimelineLoader.ts +2 -2
  264. package/front_end/panels/timeline/TimelinePaintProfilerView.ts +4 -4
  265. package/front_end/panels/timeline/TimelinePanel.ts +10 -10
  266. package/front_end/panels/timeline/TimelineUIUtils.ts +2 -2
  267. package/front_end/panels/timeline/components/WebVitalsTimeline.ts +2 -2
  268. package/front_end/panels/web_audio/WebAudioModel.ts +1 -1
  269. package/front_end/panels/web_audio/WebAudioView.ts +1 -1
  270. package/front_end/panels/webauthn/WebauthnPane.ts +7 -7
  271. package/front_end/third_party/acorn/acorn.ts +1 -1
  272. package/front_end/ui/components/buttons/Button.ts +10 -10
  273. package/front_end/ui/components/data_grid/DataGrid.ts +14 -14
  274. package/front_end/ui/components/docs/tree_outline/basic.ts +2 -2
  275. package/front_end/ui/components/docs/tree_outline/custom-renderers.ts +1 -1
  276. package/front_end/ui/components/docs/tree_outline/lazy-children.ts +1 -1
  277. package/front_end/ui/components/helpers/scheduled-render.ts +1 -1
  278. package/front_end/ui/components/icon_button/Icon.ts +1 -1
  279. package/front_end/ui/components/issue_counter/IssueCounter.ts +1 -1
  280. package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +2 -2
  281. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +2 -2
  282. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +5 -2
  283. package/front_end/ui/components/linkifier/LinkifierImpl.ts +1 -1
  284. package/front_end/ui/components/panel_feedback/FeedbackButton.ts +1 -1
  285. package/front_end/ui/components/panel_feedback/PanelFeedback.ts +1 -1
  286. package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +3 -3
  287. package/front_end/ui/components/text_editor/cursor_tooltip.ts +1 -1
  288. package/front_end/ui/components/text_editor/javascript.ts +2 -2
  289. package/front_end/ui/components/tree_outline/TreeOutline.ts +8 -8
  290. package/front_end/ui/legacy/Context.ts +1 -1
  291. package/front_end/ui/legacy/ContextMenu.ts +1 -1
  292. package/front_end/ui/legacy/GlassPane.ts +0 -1
  293. package/front_end/ui/legacy/InspectorView.ts +2 -3
  294. package/front_end/ui/legacy/PopoverHelper.ts +1 -1
  295. package/front_end/ui/legacy/ResizerWidget.ts +4 -2
  296. package/front_end/ui/legacy/ShortcutRegistry.ts +1 -1
  297. package/front_end/ui/legacy/SoftDropDown.ts +2 -1
  298. package/front_end/ui/legacy/TabbedPane.ts +2 -2
  299. package/front_end/ui/legacy/TextPrompt.ts +2 -2
  300. package/front_end/ui/legacy/ThrottledWidget.ts +1 -1
  301. package/front_end/ui/legacy/Toolbar.ts +3 -3
  302. package/front_end/ui/legacy/Treeoutline.ts +15 -21
  303. package/front_end/ui/legacy/UIUtils.ts +17 -24
  304. package/front_end/ui/legacy/ViewManager.ts +10 -10
  305. package/front_end/ui/legacy/Widget.ts +3 -2
  306. package/front_end/ui/legacy/components/color_picker/ContrastOverlay.ts +1 -1
  307. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +7 -7
  308. package/front_end/ui/legacy/components/color_picker/spectrum.css +5 -2
  309. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +3 -3
  310. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +3 -2
  311. package/front_end/ui/legacy/components/data_grid/ShowMoreDataGridNode.ts +3 -3
  312. package/front_end/ui/legacy/components/inline_editor/CSSAngleEditor.ts +1 -1
  313. package/front_end/ui/legacy/components/inline_editor/FontEditor.ts +4 -4
  314. package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +3 -3
  315. package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +1 -1
  316. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +11 -11
  317. package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +8 -8
  318. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +13 -18
  319. package/front_end/ui/legacy/components/perf_ui/GCActionDelegate.ts +1 -1
  320. package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +1 -1
  321. package/front_end/ui/legacy/components/perf_ui/LiveHeapProfile.ts +3 -3
  322. package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +2 -1
  323. package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +3 -6
  324. package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +2 -2
  325. package/front_end/ui/legacy/components/perf_ui/flameChart.css +8 -0
  326. package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +5 -5
  327. package/front_end/ui/legacy/components/source_frame/FontView.ts +1 -2
  328. package/front_end/ui/legacy/components/source_frame/ImageView.ts +3 -4
  329. package/front_end/ui/legacy/components/source_frame/JSONView.ts +0 -1
  330. package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +1 -2
  331. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +5 -5
  332. package/front_end/ui/legacy/components/source_frame/XMLView.ts +0 -2
  333. package/front_end/ui/legacy/components/utils/ImagePreview.ts +1 -1
  334. package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +1 -1
  335. package/front_end/ui/legacy/components/utils/Linkifier.ts +5 -5
  336. package/front_end/ui/legacy/components/utils/TargetDetachedDialog.ts +2 -2
  337. package/front_end/ui/legacy/inspectorSyntaxHighlight.css +8 -11
  338. package/front_end/ui/legacy/softContextMenu.css +4 -1
  339. package/front_end/ui/legacy/tabbedPane.css +1 -0
  340. package/front_end/ui/legacy/themeColors.css +3 -1
  341. package/front_end/ui/legacy/theme_support/theme_support_impl.ts +24 -234
  342. package/front_end/ui/legacy/toolbar.css +1 -0
  343. package/front_end/ui/legacy/treeoutline.css +0 -4
  344. package/front_end/ui/legacy/utils/create-shadow-root-with-core-styles.ts +3 -2
  345. package/front_end/ui/legacy/utils/inject-core-styles.ts +3 -31
  346. package/front_end/ui/legacy/utils/utils.ts +1 -5
  347. package/front_end/ui/lit-html/lit-html.ts +1 -1
  348. package/package.json +1 -1
  349. package/scripts/build/generate_css_js_files.js +2 -2
  350. package/scripts/build/ninja/generate_css.gni +3 -0
  351. package/scripts/component_server/server.js +2 -2
  352. package/scripts/eslint_rules/lib/no_bound_component_methods.js +116 -0
  353. package/scripts/eslint_rules/tests/no_bound_component_methods_test.js +85 -0
  354. package/front_end/global_typings/intl_display_names.d.ts +0 -111
  355. package/front_end/ui/legacy/inspectorSyntaxHighlightDark.css +0 -270
  356. package/front_end/ui/legacy/utils/append-style.ts +0 -9
package/.eslintrc.js CHANGED
@@ -157,6 +157,7 @@ module.exports = {
157
157
  }
158
158
  }
159
159
  ],
160
+ '@typescript-eslint/no-floating-promises': [2, {ignoreVoid: true}],
160
161
  // func-call-spacing doesn't work well with .ts
161
162
  'func-call-spacing': 0,
162
163
  '@typescript-eslint/func-call-spacing': 2,
package/AUTHORS CHANGED
@@ -13,6 +13,7 @@
13
13
  # BEGIN individuals section.
14
14
  Ajay Panthagani <ajaypanthagani321@gmail.com>
15
15
  Alexander Stammbach <alexander@stammbach.io>
16
+ Alexey Rodionov <fluorescent.hallucinogen@gmail.com>
16
17
  Ankit Mishra <ankit.mishra131990@gmail.com>
17
18
  Anna Agoha <annaagoha@gmail.com>
18
19
  Anthony Xie <anthonyxie64@gmail.com>
@@ -1553,7 +1553,6 @@ grd_files_debug_sources = [
1553
1553
  "front_end/ui/legacy/inspectorCommon.css.js",
1554
1554
  "front_end/ui/legacy/inspectorCommon.css.legacy.js",
1555
1555
  "front_end/ui/legacy/inspectorSyntaxHighlight.css.legacy.js",
1556
- "front_end/ui/legacy/inspectorSyntaxHighlightDark.css.legacy.js",
1557
1556
  "front_end/ui/legacy/inspectorViewTabbedPane.css.legacy.js",
1558
1557
  "front_end/ui/legacy/listWidget.css.legacy.js",
1559
1558
  "front_end/ui/legacy/popover.css.legacy.js",
@@ -1578,7 +1577,6 @@ grd_files_debug_sources = [
1578
1577
  "front_end/ui/legacy/theme_support/theme_support_impl.js",
1579
1578
  "front_end/ui/legacy/toolbar.css.legacy.js",
1580
1579
  "front_end/ui/legacy/treeoutline.css.legacy.js",
1581
- "front_end/ui/legacy/utils/append-style.js",
1582
1580
  "front_end/ui/legacy/utils/create-shadow-root-with-core-styles.js",
1583
1581
  "front_end/ui/legacy/utils/focus-changed.js",
1584
1582
  "front_end/ui/legacy/utils/inject-core-styles.js",
@@ -7,7 +7,6 @@ bmeurer@chromium.org
7
7
  dsv@chromium.org
8
8
  changhaohan@chromium.org
9
9
  jacktfranklin@chromium.org
10
- janscheffler@chromium.org
11
10
  jarin@chromium.org
12
11
  jobay@chromium.org
13
12
  kimanh@chromium.org
@@ -15,9 +14,10 @@ kprokopenko@chromium.org
15
14
  leese@chromium.org
16
15
  mathias@chromium.org
17
16
  nancyly@chromium.org
17
+ nechaev@chromium.org
18
+ petermueller@chromium.org
18
19
  pfaffe@chromium.org
19
20
  sadym@chromium.org
20
- sigurds@chromium.org
21
21
  szuend@chromium.org
22
22
  tvanderlippe@chromium.org
23
23
  victorporof@chromium.org
@@ -116,17 +116,7 @@ module.exports = {
116
116
  'format': ['camelCase'],
117
117
  'leadingUnderscore': 'allow',
118
118
  }
119
- ],
120
- 'no-restricted-syntax': [
121
- 'warn', {
122
- // Matches the common pattern of `.registerRequiredCSS('path\to\module-styles.css');`.
123
- 'selector':
124
- 'CallExpression[callee.property.name="registerRequiredCSS"][arguments.length=1]:has(Literal[value=/css$/])',
125
- 'message': 'Styles should be imported using `import styles from \'[file name].css(.legacy).js\';` and' +
126
- // Intentional double periods.. since trailing period is stripped from output.
127
- ' registered using `.registerCSSFiles([styles]);` or `.registerRequiredCSS(legacyStyles);` syntax..',
128
- }
129
- ],
119
+ ]
130
120
  }
131
121
  },
132
122
  {
@@ -3,7 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
  const fs = require('fs');
5
5
  const path = require('path');
6
- const [, , targetGenDir, targetName, ...imageSources] = process.argv;
6
+ const [, , buildTimestamp, targetGenDir, targetName, ...imageSources] = process.argv;
7
7
 
8
8
  /**
9
9
  * @param {string} fileName
@@ -18,7 +18,7 @@ function generateCSSVariableDefinition(fileName) {
18
18
  fileName}', import.meta.url).toString() + '\\")');`;
19
19
  }
20
20
 
21
- const CURRENT_YEAR = new Date().getFullYear();
21
+ const CURRENT_YEAR = new Date(Number(buildTimestamp) * 1000).getFullYear();
22
22
  const fileContent = `
23
23
  // Copyright ${CURRENT_YEAR} The Chromium Authors. All rights reserved.
24
24
  // Use of this source code is governed by a BSD-style license that can be
@@ -50,7 +50,7 @@ export class Console extends ObjectWrapper<EventTypes> {
50
50
  }
51
51
 
52
52
  show(): void {
53
- this.showPromise();
53
+ void this.showPromise();
54
54
  }
55
55
 
56
56
  showPromise(): Promise<void> {
@@ -29,7 +29,40 @@
29
29
  */
30
30
 
31
31
  import * as Platform from '../platform/platform.js';
32
- import * as Root from '../root/root.js';
32
+
33
+ /**
34
+ * http://tools.ietf.org/html/rfc3986#section-5.2.4
35
+ */
36
+ export function normalizePath(path: string): string {
37
+ if (path.indexOf('..') === -1 && path.indexOf('.') === -1) {
38
+ return path;
39
+ }
40
+
41
+ const normalizedSegments = [];
42
+ const segments = path.split('/');
43
+ for (const segment of segments) {
44
+ if (segment === '.') {
45
+ continue;
46
+ } else if (segment === '..') {
47
+ normalizedSegments.pop();
48
+ } else if (segment) {
49
+ normalizedSegments.push(segment);
50
+ }
51
+ }
52
+ let normalizedPath = normalizedSegments.join('/');
53
+ if (normalizedPath[normalizedPath.length - 1] === '/') {
54
+ return normalizedPath;
55
+ }
56
+ if (path[0] === '/' && normalizedPath) {
57
+ normalizedPath = '/' + normalizedPath;
58
+ }
59
+ if ((path[path.length - 1] === '/') || (segments[segments.length - 1] === '.') ||
60
+ (segments[segments.length - 1] === '..')) {
61
+ normalizedPath = normalizedPath + '/';
62
+ }
63
+
64
+ return normalizedPath;
65
+ }
33
66
 
34
67
  export class ParsedURL {
35
68
  isValid: boolean;
@@ -291,7 +324,7 @@ export class ParsedURL {
291
324
  if (hrefPath.charAt(0) !== '/') {
292
325
  hrefPath = parsedURL.folderPathComponents + '/' + hrefPath;
293
326
  }
294
- return securityOrigin + Root.Runtime.Runtime.normalizePath(hrefPath) + hrefSuffix;
327
+ return securityOrigin + normalizePath(hrefPath) + hrefSuffix;
295
328
  }
296
329
 
297
330
  static splitLineAndColumn(string: string): {
@@ -42,7 +42,7 @@ export abstract class ResolverBase<Id, T> {
42
42
  const obj = this.getForId(id);
43
43
  if (!obj) {
44
44
  const swallowTheError = (): void => {};
45
- this.getOrCreatePromise(id).catch(swallowTheError).then(obj => {
45
+ void this.getOrCreatePromise(id).catch(swallowTheError).then(obj => {
46
46
  if (obj) {
47
47
  callback(obj);
48
48
  }
@@ -36,7 +36,7 @@ import {Format} from './Color.js';
36
36
  import {Console} from './Console.js';
37
37
  import type {GenericEvents, EventDescriptor, EventTargetEvent} from './EventTarget.js';
38
38
  import {ObjectWrapper} from './Object.js';
39
- import {getLocalizedSettingsCategory, getRegisteredSettings, maybeRemoveSettingExtension, RegExpSettingItem, registerSettingExtension, registerSettingsForTest, resetSettings, SettingCategory, SettingExtensionOption, SettingRegistration, SettingType} from './SettingRegistration.js';
39
+ import {getLocalizedSettingsCategory, getRegisteredSettings, maybeRemoveSettingExtension, type RegExpSettingItem, registerSettingExtension, registerSettingsForTest, resetSettings, SettingCategory, type SettingExtensionOption, type SettingRegistration, SettingType} from './SettingRegistration.js';
40
40
 
41
41
  let settingsInstance: Settings|undefined;
42
42
 
@@ -48,7 +48,7 @@ export class Throttler {
48
48
  this.#asSoonAsPossible = false;
49
49
  this.#isRunningProcess = true;
50
50
 
51
- Promise.resolve()
51
+ void Promise.resolve()
52
52
  .then(this.#process)
53
53
  .catch(console.error.bind(console))
54
54
  .then(this.processCompleted.bind(this))
@@ -48,7 +48,7 @@ export class WorkerWrapper {
48
48
  }
49
49
 
50
50
  postMessage(message: unknown): void {
51
- this.#workerPromise.then(worker => {
51
+ void this.#workerPromise.then(worker => {
52
52
  if (!this.#disposed) {
53
53
  worker.postMessage(message);
54
54
  }
@@ -57,7 +57,7 @@ export class WorkerWrapper {
57
57
 
58
58
  dispose(): void {
59
59
  this.#disposed = true;
60
- this.#workerPromise.then(worker => worker.terminate());
60
+ void this.#workerPromise.then(worker => worker.terminate());
61
61
  }
62
62
 
63
63
  terminate(): void {
@@ -65,13 +65,13 @@ export class WorkerWrapper {
65
65
  }
66
66
 
67
67
  set onmessage(listener: (event: MessageEvent) => void) {
68
- this.#workerPromise.then(worker => {
68
+ void this.#workerPromise.then(worker => {
69
69
  worker.onmessage = listener;
70
70
  });
71
71
  }
72
72
 
73
73
  set onerror(listener: (event: Event) => void) {
74
- this.#workerPromise.then(worker => {
74
+ void this.#workerPromise.then(worker => {
75
75
  worker.onerror = listener;
76
76
  });
77
77
  }
@@ -130,7 +130,7 @@ export class InspectorFrontendHostStub implements InspectorFrontendHostAPI {
130
130
  if (text === undefined || text === null) {
131
131
  return;
132
132
  }
133
- navigator.clipboard.writeText(text);
133
+ void navigator.clipboard.writeText(text);
134
134
  }
135
135
 
136
136
  openInNewTab(url: string): void {
@@ -220,7 +220,8 @@ export class InspectorFrontendHostStub implements InspectorFrontendHostAPI {
220
220
 
221
221
  loadNetworkResource(
222
222
  url: string, headers: string, streamId: number, callback: (arg0: LoadNetworkResourceResult) => void): void {
223
- Root.Runtime.loadResourcePromise(url)
223
+ fetch(url)
224
+ .then(result => result.text())
224
225
  .then(function(text) {
225
226
  resourceLoaderStreamWrite(streamId, text);
226
227
  callback({
@@ -82,12 +82,12 @@ const _bindOutputStream = function(stream: Common.StringOutputStream.OutputStrea
82
82
  };
83
83
 
84
84
  const _discardOutputStream = function(id: number): void {
85
- _boundStreams[id].close();
85
+ void _boundStreams[id].close();
86
86
  delete _boundStreams[id];
87
87
  };
88
88
 
89
89
  export const streamWrite = function(id: number, chunk: string): void {
90
- _boundStreams[id].write(chunk);
90
+ void _boundStreams[id].write(chunk);
91
91
  };
92
92
  export interface LoadErrorDescription {
93
93
  statusCode: number;
@@ -77,9 +77,7 @@ export class DevToolsLocale {
77
77
  * return false.
78
78
  */
79
79
  export function localeLanguagesMatch(localeString1: string, localeString2: string): boolean {
80
- // @ts-ignore TODO(crbug.com/1163928) Wait for Intl support.
81
80
  const locale1 = new Intl.Locale(localeString1);
82
- // @ts-ignore TODO(crbug.com/1163928) Wait for Intl support.
83
81
  const locale2 = new Intl.Locale(localeString2);
84
82
  return locale1.language === locale2.language;
85
83
  }
@@ -56,11 +56,10 @@ function getLocaleFetchUrl(locale: Intl.UnicodeBCP47LocaleIdentifier): string {
56
56
  * fetched locally or remotely.
57
57
  */
58
58
  export async function fetchAndRegisterLocaleData(locale: Intl.UnicodeBCP47LocaleIdentifier): Promise<void> {
59
- const localeDataTextPromise = Root.Runtime.loadResourcePromise(getLocaleFetchUrl(locale));
59
+ const localeDataTextPromise = fetch(getLocaleFetchUrl(locale)).then(result => result.json());
60
60
  const timeoutPromise =
61
61
  new Promise((resolve, reject) => setTimeout(() => reject(new Error('timed out fetching locale')), 5000));
62
- const localeDataText = await Promise.race([timeoutPromise, localeDataTextPromise]);
63
- const localeData = JSON.parse(localeDataText as string);
62
+ const localeData = await Promise.race([timeoutPromise, localeDataTextPromise]);
64
63
  i18nInstance.registerLocaleData(locale, localeData);
65
64
  }
66
65
 
@@ -158,13 +157,11 @@ export function lockedLazyString(str: string): () => Platform.UIString.Localized
158
157
  export function getLocalizedLanguageRegion(
159
158
  localeString: Intl.UnicodeBCP47LocaleIdentifier,
160
159
  devtoolsLocale: DevToolsLocale): Platform.UIString.LocalizedString {
161
- // @ts-ignore TODO(crbug.com/1163928) Wait for Intl support.
162
160
  const locale = new Intl.Locale(localeString);
163
161
  Platform.DCHECK(() => locale.language !== undefined);
164
162
  Platform.DCHECK(() => locale.baseName !== undefined);
165
163
  const localLanguage = locale.language || 'en';
166
164
  const localBaseName = locale.baseName || 'en-US';
167
- // @ts-ignore TODO(crbug.com/1163928) Wait for Intl support.
168
165
  const devtoolsLoc = new Intl.Locale(devtoolsLocale.locale);
169
166
  const targetLanguage = localLanguage === devtoolsLoc.language ? 'en' : localBaseName;
170
167
  const languageInCurrentLocale = new Intl.DisplayNames([devtoolsLocale.locale], {type: 'language'}).of(localLanguage);
@@ -1190,9 +1190,6 @@
1190
1190
  "entrypoints/main/MainImpl.ts | showConsoleDrawer": {
1191
1191
  "message": "Show console drawer"
1192
1192
  },
1193
- "entrypoints/main/MainImpl.ts | theSystempreferredColorSchemeHas": {
1194
- "message": "The system-preferred color scheme has changed. To apply this change to DevTools, reload."
1195
- },
1196
1193
  "entrypoints/main/MainImpl.ts | undockIntoSeparateWindow": {
1197
1194
  "message": "Undock into separate window"
1198
1195
  },
@@ -2477,6 +2474,9 @@
2477
2474
  "panels/application/components/BackForwardCacheStrings.ts | contentMediaSessionService": {
2478
2475
  "message": "Pages that use MediaSession API and set action handlers are not eligible for back/forward cache."
2479
2476
  },
2477
+ "panels/application/components/BackForwardCacheStrings.ts | contentScreenReader": {
2478
+ "message": "Back/forward cache is disabled due to screen reader."
2479
+ },
2480
2480
  "panels/application/components/BackForwardCacheStrings.ts | contentSecurityHandler": {
2481
2481
  "message": "Pages that use SecurityHandler are not eligible for back/forward cache."
2482
2482
  },
@@ -1190,9 +1190,6 @@
1190
1190
  "entrypoints/main/MainImpl.ts | showConsoleDrawer": {
1191
1191
  "message": "Ŝh́ôẃ ĉón̂śôĺê d́r̂áŵér̂"
1192
1192
  },
1193
- "entrypoints/main/MainImpl.ts | theSystempreferredColorSchemeHas": {
1194
- "message": "T̂h́ê śŷśt̂ém̂-ṕr̂éf̂ér̂ŕêd́ ĉól̂ór̂ śĉh́êḿê h́âś ĉh́âńĝéd̂. T́ô áp̂ṕl̂ý t̂h́îś ĉh́âńĝé t̂ó D̂év̂T́ôól̂ś, r̂él̂óâd́."
1195
- },
1196
1193
  "entrypoints/main/MainImpl.ts | undockIntoSeparateWindow": {
1197
1194
  "message": "Ûńd̂óĉḱ îńt̂ó ŝép̂ár̂át̂é ŵín̂d́ôẃ"
1198
1195
  },
@@ -2477,6 +2474,9 @@
2477
2474
  "panels/application/components/BackForwardCacheStrings.ts | contentMediaSessionService": {
2478
2475
  "message": "P̂áĝéŝ t́ĥát̂ úŝé M̂éd̂íâŚêśŝíôń ÂṔÎ án̂d́ ŝét̂ áĉt́îón̂ h́âńd̂ĺêŕŝ ár̂é n̂ót̂ él̂íĝíb̂ĺê f́ôŕ b̂áĉḱ/f̂ór̂ẃâŕd̂ ćâćĥé."
2479
2476
  },
2477
+ "panels/application/components/BackForwardCacheStrings.ts | contentScreenReader": {
2478
+ "message": "B̂áĉḱ/f̂ór̂ẃâŕd̂ ćâćĥé îś d̂íŝáb̂ĺêd́ d̂úê t́ô śĉŕêén̂ ŕêád̂ér̂."
2479
+ },
2480
2480
  "panels/application/components/BackForwardCacheStrings.ts | contentSecurityHandler": {
2481
2481
  "message": "P̂áĝéŝ t́ĥát̂ úŝé Ŝéĉúr̂ít̂ýĤán̂d́l̂ér̂ ár̂é n̂ót̂ él̂íĝíb̂ĺê f́ôŕ b̂áĉḱ/f̂ór̂ẃâŕd̂ ćâćĥé."
2482
2482
  },
@@ -47,40 +47,6 @@ export class Runtime {
47
47
  runtimeInstance = undefined;
48
48
  }
49
49
 
50
- /**
51
- * http://tools.ietf.org/html/rfc3986#section-5.2.4
52
- */
53
- static normalizePath(path: string): string {
54
- if (path.indexOf('..') === -1 && path.indexOf('.') === -1) {
55
- return path;
56
- }
57
-
58
- const normalizedSegments = [];
59
- const segments = path.split('/');
60
- for (const segment of segments) {
61
- if (segment === '.') {
62
- continue;
63
- } else if (segment === '..') {
64
- normalizedSegments.pop();
65
- } else if (segment) {
66
- normalizedSegments.push(segment);
67
- }
68
- }
69
- let normalizedPath = normalizedSegments.join('/');
70
- if (normalizedPath[normalizedPath.length - 1] === '/') {
71
- return normalizedPath;
72
- }
73
- if (path[0] === '/' && normalizedPath) {
74
- normalizedPath = '/' + normalizedPath;
75
- }
76
- if ((path[path.length - 1] === '/') || (segments[segments.length - 1] === '.') ||
77
- (segments[segments.length - 1] === '..')) {
78
- normalizedPath = normalizedPath + '/';
79
- }
80
-
81
- return normalizedPath;
82
- }
83
-
84
50
  static queryParam(name: string): string|null {
85
51
  return queryParamsObject.get(name);
86
52
  }
@@ -132,15 +98,6 @@ export class Runtime {
132
98
  return true;
133
99
  }
134
100
 
135
- static resolveSourceURL(path: string): string {
136
- let sourceURL: string = self.location.href;
137
- if (self.location.search) {
138
- sourceURL = sourceURL.replace(self.location.search, '');
139
- }
140
- sourceURL = sourceURL.substring(0, sourceURL.lastIndexOf('/') + 1) + path;
141
- return '\n/*# sourceURL=' + sourceURL + ' */';
142
- }
143
-
144
101
  loadLegacyModule(modulePath: string): Promise<void> {
145
102
  return import(`../../${modulePath}`);
146
103
  }
@@ -297,35 +254,6 @@ export class Experiment {
297
254
  }
298
255
  }
299
256
 
300
- export function loadResourcePromise(url: string): Promise<string> {
301
- return new Promise<string>(load);
302
-
303
- function load(fulfill: (arg0: string) => void, reject: (arg0: Error) => void): void {
304
- const xhr = new XMLHttpRequest();
305
- xhr.open('GET', url, true);
306
- xhr.onreadystatechange = onreadystatechange;
307
-
308
- function onreadystatechange(this: XMLHttpRequest, _e: Event): void {
309
- if (xhr.readyState !== XMLHttpRequest.DONE) {
310
- return;
311
- }
312
-
313
- const response: string = this.response;
314
-
315
- // DevTools Proxy server can mask 404s as 200s, check the body to be sure
316
- const status = /^HTTP\/1.1 404/.test(response) ? 404 : xhr.status;
317
-
318
- if ([0, 200, 304].indexOf(status) === -1) // Testing harness file:/// results in 0.
319
- {
320
- reject(new Error('While loading from url ' + url + ' server responded with a status of ' + status));
321
- } else {
322
- fulfill(response);
323
- }
324
- }
325
- xhr.send(null);
326
- }
327
- }
328
-
329
257
  // This must be constructed after the query parameters have been parsed.
330
258
  export const experiments = new ExperimentsSupport();
331
259
 
@@ -20,8 +20,6 @@ Root.Runtime.queryParam = RootModule.Runtime.Runtime.queryParam;
20
20
  /** @type {!RootModule.Runtime.Runtime} */
21
21
  Root.runtime;
22
22
 
23
- Root.Runtime.loadResourcePromise = RootModule.Runtime.loadResourcePromise;
24
-
25
23
  /** @constructor */
26
24
  Root.Runtime.Extension = RootModule.Runtime.Extension;
27
25
 
@@ -218,7 +218,7 @@ export class AccessibilityModel extends SDKModel<EventTypes> implements Protocol
218
218
  super(target);
219
219
  target.registerAccessibilityDispatcher(this);
220
220
  this.agent = target.accessibilityAgent();
221
- this.resumeModel();
221
+ void this.resumeModel();
222
222
 
223
223
  this.#axIdToAXNode = new Map();
224
224
  this.#backendDOMNodeIdToAXNode = new Map();
@@ -66,7 +66,7 @@ export class CPUProfilerModel extends SDKModel<EventTypes> implements ProtocolPr
66
66
  this.#profilerAgent = target.profilerAgent();
67
67
  this.#preciseCoverageDeltaUpdateCallback = null;
68
68
  target.registerProfilerDispatcher(this);
69
- this.#profilerAgent.invoke_enable();
69
+ void this.#profilerAgent.invoke_enable();
70
70
  this.#debuggerModelInternal = (target.model(DebuggerModel) as DebuggerModel);
71
71
  }
72
72
 
@@ -118,7 +118,7 @@ export class CPUProfilerModel extends SDKModel<EventTypes> implements ProtocolPr
118
118
  startRecording(): Promise<unknown> {
119
119
  this.#isRecording = true;
120
120
  const intervalUs = 100;
121
- this.#profilerAgent.invoke_setSamplingInterval({interval: intervalUs});
121
+ void this.#profilerAgent.invoke_setSamplingInterval({interval: intervalUs});
122
122
  return this.#profilerAgent.invoke_start();
123
123
  }
124
124
 
@@ -36,14 +36,14 @@ export class CPUThrottlingManager extends Common.ObjectWrapper.ObjectWrapper<Eve
36
36
  setCPUThrottlingRate(rate: number): void {
37
37
  this.#cpuThrottlingRateInternal = rate;
38
38
  for (const emulationModel of TargetManager.instance().models(EmulationModel)) {
39
- emulationModel.setCPUThrottlingRate(this.#cpuThrottlingRateInternal);
39
+ void emulationModel.setCPUThrottlingRate(this.#cpuThrottlingRateInternal);
40
40
  }
41
41
  this.dispatchEventToListeners(Events.RateChanged, this.#cpuThrottlingRateInternal);
42
42
  }
43
43
 
44
44
  modelAdded(emulationModel: EmulationModel): void {
45
45
  if (this.#cpuThrottlingRateInternal !== CPUThrottlingRates.NoThrottling) {
46
- emulationModel.setCPUThrottlingRate(this.#cpuThrottlingRateInternal);
46
+ void emulationModel.setCPUThrottlingRate(this.#cpuThrottlingRateInternal);
47
47
  }
48
48
  }
49
49
 
@@ -89,7 +89,7 @@ export class CSSModel extends SDKModel<EventTypes> {
89
89
  }
90
90
  target.registerCSSDispatcher(new CSSDispatcher(this));
91
91
  if (!target.suspended()) {
92
- this.enable();
92
+ void this.enable();
93
93
  }
94
94
  this.#styleSheetIdToHeader = new Map();
95
95
  this.#styleSheetIdsForURL = new Map();
@@ -377,7 +377,7 @@ export class CSSModel extends SDKModel<EventTypes> {
377
377
  if (node.id === undefined) {
378
378
  return false;
379
379
  }
380
- this.agent.invoke_forcePseudoState({nodeId: node.id, forcedPseudoClasses});
380
+ void this.agent.invoke_forcePseudoState({nodeId: node.id, forcedPseudoClasses});
381
381
  this.dispatchEventToListeners(Events.PseudoStateForced, {node: node, pseudoClass: pseudoClass, enable: enable});
382
382
  return true;
383
383
  }
@@ -662,7 +662,7 @@ export class CSSModel extends SDKModel<EventTypes> {
662
662
  }
663
663
 
664
664
  setEffectivePropertyValueForNode(nodeId: Protocol.DOM.NodeId, propertyName: string, value: string): void {
665
- this.agent.invoke_setEffectivePropertyValueForNode({nodeId, propertyName, value});
665
+ void this.agent.invoke_setEffectivePropertyValueForNode({nodeId, propertyName, value});
666
666
  }
667
667
 
668
668
  cachedMatchedCascadeForNode(node: DOMNode): Promise<CSSMatchedStyles|null> {
@@ -695,10 +695,10 @@ export class CSSModel extends SDKModel<EventTypes> {
695
695
  if (propertiesToTrack.length === 0) {
696
696
  return;
697
697
  }
698
- this.agent.invoke_trackComputedStyleUpdates({propertiesToTrack});
698
+ void this.agent.invoke_trackComputedStyleUpdates({propertiesToTrack});
699
699
  this.#isCSSPropertyTrackingEnabled = true;
700
700
  this.#cssPropertyTracker = cssPropertyTracker;
701
- this.pollComputedStyleUpdates();
701
+ void this.pollComputedStyleUpdates();
702
702
  }
703
703
 
704
704
  // Since we only support one tracker at a time, this call effectively disables
@@ -707,7 +707,7 @@ export class CSSModel extends SDKModel<EventTypes> {
707
707
  this.#isCSSPropertyTrackingEnabled = false;
708
708
  this.#cssPropertyTracker = null;
709
709
  // Sending an empty list to the backend signals the close of style tracking
710
- this.agent.invoke_trackComputedStyleUpdates({propertiesToTrack: []});
710
+ void this.agent.invoke_trackComputedStyleUpdates({propertiesToTrack: []});
711
711
  }
712
712
 
713
713
  private async pollComputedStyleUpdates(): Promise<void> {
@@ -732,7 +732,7 @@ export class CSSModel extends SDKModel<EventTypes> {
732
732
  }
733
733
 
734
734
  if (this.#isCSSPropertyTrackingEnabled) {
735
- this.#stylePollingThrottler.schedule(this.pollComputedStyleUpdates.bind(this));
735
+ void this.#stylePollingThrottler.schedule(this.pollComputedStyleUpdates.bind(this));
736
736
  }
737
737
  }
738
738
 
@@ -274,7 +274,7 @@ export class CSSProperty {
274
274
 
275
275
  setValue(newValue: string, majorChange: boolean, overwrite: boolean, userCallback?: ((arg0: boolean) => void)): void {
276
276
  const text = this.name + ': ' + newValue + (this.important ? ' !important' : '') + ';';
277
- this.setText(text, majorChange, overwrite).then(userCallback);
277
+ void this.setText(text, majorChange, overwrite).then(userCallback);
278
278
  }
279
279
 
280
280
  setDisabled(disabled: boolean): Promise<boolean> {
@@ -353,7 +353,7 @@ export class CSSStyleDeclaration {
353
353
  }
354
354
 
355
355
  insertPropertyAt(index: number, name: string, value: string, userCallback?: ((arg0: boolean) => void)): void {
356
- this.newBlankProperty(index).setText(name + ': ' + value + ';', false, true).then(userCallback);
356
+ void this.newBlankProperty(index).setText(name + ': ' + value + ';', false, true).then(userCallback);
357
357
  }
358
358
 
359
359
  appendProperty(name: string, value: string, userCallback?: ((arg0: boolean) => void)): void {
@@ -33,16 +33,16 @@ export class ChildTargetManager extends SDKModel<EventTypes> implements Protocol
33
33
  const browserTarget = this.#targetManager.browserTarget();
34
34
  if (browserTarget) {
35
35
  if (browserTarget !== parentTarget) {
36
- browserTarget.targetAgent().invoke_autoAttachRelated(
36
+ void browserTarget.targetAgent().invoke_autoAttachRelated(
37
37
  {targetId: parentTarget.id() as Protocol.Target.TargetID, waitForDebuggerOnStart: true});
38
38
  }
39
39
  } else {
40
- this.#targetAgent.invoke_setAutoAttach({autoAttach: true, waitForDebuggerOnStart: true, flatten: true});
40
+ void this.#targetAgent.invoke_setAutoAttach({autoAttach: true, waitForDebuggerOnStart: true, flatten: true});
41
41
  }
42
42
 
43
43
  if (!parentTarget.parentTarget() && !Host.InspectorFrontendHost.isUnderTest()) {
44
- this.#targetAgent.invoke_setDiscoverTargets({discover: true});
45
- this.#targetAgent.invoke_setRemoteLocations({locations: [{host: 'localhost', port: 9229}]});
44
+ void this.#targetAgent.invoke_setDiscoverTargets({discover: true});
45
+ void this.#targetAgent.invoke_setRemoteLocations({locations: [{host: 'localhost', port: 9229}]});
46
46
  }
47
47
  }
48
48
 
@@ -150,7 +150,7 @@ export class ChildTargetManager extends SDKModel<EventTypes> implements Protocol
150
150
  if (ChildTargetManager.attachCallback) {
151
151
  await ChildTargetManager.attachCallback({target, waitingForDebugger});
152
152
  }
153
- target.runtimeAgent().invoke_runIfWaitingForDebugger();
153
+ void target.runtimeAgent().invoke_runIfWaitingForDebugger();
154
154
  }
155
155
 
156
156
  detachedFromTarget({sessionId}: Protocol.Target.DetachedFromTargetEvent): void {
@@ -194,7 +194,7 @@ export class ChildTargetManager extends SDKModel<EventTypes> implements Protocol
194
194
  targetRouter.registerSession(target, sessionId, connection);
195
195
  connection.setOnDisconnect(() => {
196
196
  targetRouter.unregisterSession(sessionId);
197
- targetAgent.invoke_detachFromTarget({sessionId});
197
+ void targetAgent.invoke_detachFromTarget({sessionId});
198
198
  });
199
199
  return {connection, sessionId};
200
200
  }
@@ -270,10 +270,10 @@ export async function initMainConnection(
270
270
  if (target) {
271
271
  const router = target.router();
272
272
  if (router) {
273
- router.connection().disconnect();
273
+ void router.connection().disconnect();
274
274
  }
275
275
  }
276
- createMainTarget();
276
+ void createMainTarget();
277
277
  });
278
278
  }
279
279
 
@@ -423,7 +423,7 @@ export class ConsoleModel extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
423
423
  } else {
424
424
  const text = (callFunctionResult.object.value as string);
425
425
  const message = this.addCommandMessage(executionContext, text);
426
- this.evaluateCommandInConsole(executionContext, message, text, /* useCommandLineAPI */ false);
426
+ void this.evaluateCommandInConsole(executionContext, message, text, /* useCommandLineAPI */ false);
427
427
  }
428
428
  if (callFunctionResult.object) {
429
429
  callFunctionResult.object.release();