chrome-devtools-frontend 1.0.1545096 → 1.0.1547571

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (301) hide show
  1. package/.stylelintrc.json +5 -1
  2. package/docs/contributing/infrastructure.md +2 -2
  3. package/docs/styleguide/ux/styles.md +1 -1
  4. package/eslint.config.mjs +2 -1
  5. package/front_end/Images/generate-css-vars.js +1 -1
  6. package/front_end/Images/src/arrow-down.svg +8 -1
  7. package/front_end/Images/src/arrow-up.svg +8 -1
  8. package/front_end/core/common/common.ts +0 -2
  9. package/front_end/core/host/AidaClient.ts +1 -1
  10. package/front_end/core/host/InspectorFrontendHostAPI.ts +0 -1
  11. package/front_end/core/host/UserMetrics.ts +0 -5
  12. package/front_end/core/i18n/collect-ui-strings.js +1 -1
  13. package/front_end/core/i18n/generate-locales-js.js +1 -1
  14. package/front_end/core/platform/HostRuntime.ts +25 -0
  15. package/front_end/core/platform/KeyboardUtilities.ts +2 -2
  16. package/front_end/core/platform/StringUtilities.ts +1 -1
  17. package/front_end/core/platform/api/HostRuntime.ts +45 -0
  18. package/front_end/core/platform/api/api.ts +7 -0
  19. package/front_end/core/{common/Worker.ts → platform/browser/HostRuntime.ts} +27 -12
  20. package/front_end/core/platform/browser/browser.ts +7 -0
  21. package/front_end/core/platform/node/HostRuntime.ts +85 -0
  22. package/front_end/core/platform/node/node.ts +7 -0
  23. package/front_end/core/platform/platform.ts +2 -2
  24. package/front_end/core/sdk/AnimationModel.ts +1 -1
  25. package/front_end/core/sdk/CSSModel.ts +1 -1
  26. package/front_end/core/sdk/CSSProperty.ts +1 -1
  27. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +1 -1
  28. package/front_end/core/sdk/ConsoleModel.ts +1 -1
  29. package/front_end/core/sdk/Cookie.ts +1 -1
  30. package/front_end/core/sdk/DOMModel.ts +2 -2
  31. package/front_end/core/sdk/DebuggerModel.ts +1 -1
  32. package/front_end/core/sdk/NetworkManager.ts +6 -0
  33. package/front_end/core/sdk/PreloadingModel.ts +1 -1
  34. package/front_end/core/sdk/RemoteObject.ts +1 -1
  35. package/front_end/core/sdk/ResourceTreeModel.ts +1 -1
  36. package/front_end/core/sdk/Script.ts +4 -4
  37. package/front_end/core/sdk/SourceMapScopesInfo.ts +141 -23
  38. package/front_end/core/sdk/Target.ts +5 -14
  39. package/front_end/core/sdk/TargetManager.ts +26 -4
  40. package/front_end/core/sdk/sdk-meta.ts +62 -0
  41. package/front_end/devtools_compatibility.js +0 -1
  42. package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +2 -2
  43. package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +15 -18
  44. package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +8 -5
  45. package/front_end/entrypoints/main/ExecutionContextSelector.ts +1 -1
  46. package/front_end/entrypoints/main/MainImpl.ts +4 -4
  47. package/front_end/foundation/Universe.ts +2 -2
  48. package/front_end/generated/Deprecation.ts +26 -0
  49. package/front_end/generated/InspectorBackendCommands.ts +5 -4
  50. package/front_end/generated/SupportedCSSProperties.js +17 -15
  51. package/front_end/generated/protocol-mapping.d.ts +2 -0
  52. package/front_end/generated/protocol-proxy-api.d.ts +4 -0
  53. package/front_end/generated/protocol.ts +19 -29
  54. package/front_end/models/ai_assistance/AiConversation.ts +268 -0
  55. package/front_end/models/ai_assistance/AiHistoryStorage.ts +1 -172
  56. package/front_end/models/ai_assistance/BuiltInAi.ts +131 -134
  57. package/front_end/models/ai_assistance/ChangeManager.ts +9 -0
  58. package/front_end/models/ai_assistance/ConversationHandler.ts +27 -52
  59. package/front_end/models/ai_assistance/agents/AiAgent.ts +9 -8
  60. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +6 -2
  61. package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +1 -1
  62. package/front_end/models/ai_assistance/agents/StylingAgent.ts +3 -19
  63. package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
  64. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +313 -313
  65. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +8 -6
  66. package/front_end/models/ai_assistance/performance/AICallTree.snapshot.txt +33 -33
  67. package/front_end/models/ai_assistance/performance/AICallTree.ts +9 -3
  68. package/front_end/models/bindings/CSSWorkspaceBinding.ts +5 -3
  69. package/front_end/models/bindings/SASSSourceMapping.ts +6 -4
  70. package/front_end/models/cpu_profile/CPUProfileDataModel.ts +10 -7
  71. package/front_end/models/crux-manager/CrUXManager.ts +7 -4
  72. package/front_end/models/formatter/FormatterWorkerPool.ts +9 -7
  73. package/front_end/models/har/Importer.ts +1 -1
  74. package/front_end/models/issues_manager/ContrastCheckTrigger.ts +1 -1
  75. package/front_end/models/issues_manager/GenericIssue.ts +12 -9
  76. package/front_end/models/javascript_metadata/NativeFunctions.js +4 -0
  77. package/front_end/models/persistence/AutomaticFileSystemManager.ts +1 -1
  78. package/front_end/models/trace/handlers/SamplesHandler.ts +3 -0
  79. package/front_end/models/trace/helpers/Trace.ts +13 -0
  80. package/front_end/models/trace/types/TraceEvents.ts +2 -1
  81. package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +29 -0
  82. package/front_end/models/workspace/IgnoreListManager.ts +1 -2
  83. package/front_end/models/workspace/UISourceCode.ts +50 -0
  84. package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -1
  85. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +86 -159
  86. package/front_end/panels/ai_assistance/ai_assistance-meta.ts +8 -0
  87. package/front_end/panels/ai_assistance/components/ChatView.ts +56 -33
  88. package/front_end/panels/animation/AnimationTimeline.ts +0 -8
  89. package/front_end/panels/application/ExtensionStorageModel.ts +1 -1
  90. package/front_end/panels/application/FrameDetailsView.ts +64 -36
  91. package/front_end/panels/application/ServiceWorkerCacheViews.ts +1 -1
  92. package/front_end/panels/application/components/components.ts +0 -2
  93. package/front_end/panels/common/AiCodeGenerationTeaser.ts +80 -0
  94. package/front_end/panels/common/common.ts +2 -1
  95. package/front_end/panels/console/ConsoleInsightTeaser.ts +166 -100
  96. package/front_end/panels/console/ConsolePrompt.ts +4 -2
  97. package/front_end/panels/console/ConsoleViewMessage.ts +77 -29
  98. package/front_end/panels/console/ConsoleViewport.ts +2 -3
  99. package/front_end/panels/console/consoleInsightTeaser.css +1 -0
  100. package/front_end/panels/coverage/CoverageModel.ts +2 -2
  101. package/front_end/panels/elements/ElementIssueUtils.ts +2 -2
  102. package/front_end/panels/elements/ElementsPanel.ts +1 -1
  103. package/front_end/panels/elements/ElementsTreeOutline.ts +17 -7
  104. package/front_end/panels/elements/NodeStackTraceWidget.ts +6 -5
  105. package/front_end/panels/elements/StylePropertyTreeElement.ts +24 -21
  106. package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
  107. package/front_end/panels/elements/cssValueTraceView.css +1 -1
  108. package/front_end/panels/elements/elements-meta.ts +1 -0
  109. package/front_end/panels/explain/components/ConsoleInsight.ts +44 -57
  110. package/front_end/panels/explain/components/consoleInsight.css +46 -1
  111. package/front_end/panels/layer_viewer/LayerTreeOutline.ts +1 -2
  112. package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +19 -0
  113. package/front_end/panels/network/RequestConditionsDrawer.ts +116 -42
  114. package/front_end/panels/network/networkLogView.css +11 -0
  115. package/front_end/panels/network/networkTimingTable.css +8 -6
  116. package/front_end/panels/network/requestConditionsDrawer.css +10 -1
  117. package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +1 -1
  118. package/front_end/panels/profiler/HeapSnapshotProxy.ts +15 -14
  119. package/front_end/panels/profiler/ProfilesPanel.ts +1 -2
  120. package/front_end/panels/recorder/components/StepEditor.ts +1 -1
  121. package/front_end/panels/security/SecurityPanelSidebar.ts +1 -3
  122. package/front_end/panels/settings/KeybindsSettingsTab.ts +21 -22
  123. package/front_end/panels/sources/CSSPlugin.ts +1 -1
  124. package/front_end/panels/sources/CoveragePlugin.ts +5 -5
  125. package/front_end/panels/sources/DebuggerPlugin.ts +2 -2
  126. package/front_end/panels/sources/NavigatorView.ts +1 -1
  127. package/front_end/panels/sources/Plugin.ts +1 -1
  128. package/front_end/panels/sources/ProfilePlugin.ts +22 -14
  129. package/front_end/panels/sources/SourcesSearchScope.ts +1 -1
  130. package/front_end/panels/sources/UISourceCodeFrame.ts +2 -1
  131. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +10 -2
  132. package/front_end/panels/sources/sources-meta.ts +0 -62
  133. package/front_end/panels/timeline/README.md +1 -9
  134. package/front_end/panels/timeline/ThreadAppender.ts +0 -7
  135. package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -1
  136. package/front_end/panels/timeline/TimelinePanel.ts +8 -8
  137. package/front_end/panels/timeline/TimelineUIUtils.ts +5 -1
  138. package/front_end/panels/timeline/components/ExportTraceOptions.ts +15 -1
  139. package/front_end/panels/timeline/components/LiveMetricsView.ts +37 -1
  140. package/front_end/panels/timeline/components/exportTraceOptions.css +11 -2
  141. package/front_end/panels/timeline/enable-easter-egg.js +1 -1
  142. package/front_end/panels/timeline/utils/Treemap.ts +1 -1
  143. package/front_end/third_party/chromium/README.chromium +1 -1
  144. package/front_end/third_party/puppeteer/README.chromium +2 -2
  145. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts +66 -0
  146. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
  147. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js +57 -0
  148. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
  149. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts +1 -1
  150. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
  151. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
  152. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +2 -2
  153. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
  154. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
  155. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts +1 -0
  156. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts.map +1 -1
  157. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.js +1 -0
  158. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.js.map +1 -1
  159. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
  160. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js +1 -6
  161. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js.map +1 -1
  162. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +0 -4
  163. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
  164. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +18 -23
  165. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
  166. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts +2 -0
  167. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  168. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +16 -0
  169. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  170. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts +4 -62
  171. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
  172. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js +9 -73
  173. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
  174. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts +1 -1
  175. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts.map +1 -1
  176. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.js.map +1 -1
  177. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +1 -1
  178. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
  179. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +3 -3
  180. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
  181. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts +8 -1
  182. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
  183. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js +11 -1
  184. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js.map +1 -1
  185. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  186. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
  187. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
  188. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
  189. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  190. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
  191. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
  192. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +9 -10
  193. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +80 -81
  194. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts +66 -0
  195. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
  196. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js +52 -0
  197. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
  198. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts +1 -1
  199. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
  200. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js.map +1 -1
  201. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +2 -2
  202. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
  203. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
  204. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts +1 -0
  205. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts.map +1 -1
  206. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.js +1 -0
  207. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.js.map +1 -1
  208. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
  209. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js +1 -6
  210. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js.map +1 -1
  211. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +0 -4
  212. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
  213. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +18 -23
  214. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
  215. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts +2 -0
  216. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  217. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +16 -0
  218. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  219. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts +4 -62
  220. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
  221. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js +6 -69
  222. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
  223. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts +1 -1
  224. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts.map +1 -1
  225. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.js.map +1 -1
  226. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +1 -1
  227. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
  228. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +3 -3
  229. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
  230. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts +8 -1
  231. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
  232. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js +11 -1
  233. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js.map +1 -1
  234. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
  235. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
  236. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
  237. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
  238. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
  239. package/front_end/third_party/puppeteer/package/lib/types.d.ts +9 -10
  240. package/front_end/third_party/puppeteer/package/package.json +3 -3
  241. package/front_end/third_party/puppeteer/package/src/api/DeviceRequestPrompt.ts +79 -0
  242. package/front_end/third_party/puppeteer/package/src/api/Frame.ts +1 -1
  243. package/front_end/third_party/puppeteer/package/src/api/Page.ts +2 -2
  244. package/front_end/third_party/puppeteer/package/src/api/api.ts +1 -0
  245. package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +1 -9
  246. package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +21 -31
  247. package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +18 -0
  248. package/front_end/third_party/puppeteer/package/src/cdp/DeviceRequestPrompt.ts +6 -72
  249. package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +2 -4
  250. package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +7 -2
  251. package/front_end/third_party/puppeteer/package/src/common/ConsoleMessage.ts +14 -0
  252. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  253. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  254. package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +1 -0
  255. package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +5 -0
  256. package/front_end/ui/components/text_editor/javascript.ts +1 -1
  257. package/front_end/ui/legacy/ARIAUtils.ts +2 -2
  258. package/front_end/ui/legacy/ActionRegistration.ts +11 -0
  259. package/front_end/ui/legacy/ListWidget.ts +51 -18
  260. package/front_end/ui/legacy/ReportView.ts +1 -1
  261. package/front_end/ui/legacy/SoftDropDown.ts +2 -2
  262. package/front_end/ui/legacy/TabbedPane.ts +3 -3
  263. package/front_end/ui/legacy/TextPrompt.ts +3 -2
  264. package/front_end/ui/legacy/Treeoutline.ts +3 -2
  265. package/front_end/ui/legacy/UIUtils.ts +11 -10
  266. package/front_end/ui/legacy/Widget.ts +3 -2
  267. package/front_end/ui/legacy/components/color_picker/ContrastInfo.ts +1 -1
  268. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +5 -4
  269. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +87 -111
  270. package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +62 -39
  271. package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +1 -1
  272. package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +2 -2
  273. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +3 -9
  274. package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +41 -13
  275. package/front_end/ui/legacy/components/utils/jsUtils.css +28 -0
  276. package/front_end/ui/legacy/inspectorCommon.css +2 -2
  277. package/front_end/ui/legacy/legacy.ts +2 -0
  278. package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
  279. package/front_end/ui/visual_logging/LoggingConfig.ts +2 -1
  280. package/inspector_overlay/tool_window_controls.ts +4 -1
  281. package/mcp/mcp.ts +1 -1
  282. package/package.json +2 -3
  283. package/front_end/panels/application/components/StackTrace.ts +0 -239
  284. package/front_end/panels/application/components/stackTraceLinkButton.css +0 -16
  285. package/front_end/panels/application/components/stackTraceRow.css +0 -50
  286. package/front_end/panels/explain/components/consoleInsightSourcesList.css +0 -51
  287. package/front_end/ui/components/docs/README.md +0 -6
  288. package/front_end/ui/components/docs/building-ui-documentation/ComponentEvents.md +0 -54
  289. package/front_end/ui/components/docs/building-ui-documentation/ComponentPerformance.md +0 -136
  290. package/front_end/ui/components/docs/building-ui-documentation/CreatingComponents.md +0 -242
  291. package/front_end/ui/components/docs/building-ui-documentation/README.md +0 -23
  292. package/front_end/ui/components/docs/building-ui-documentation/StylingComponents.md +0 -66
  293. package/front_end/ui/components/docs/building-ui-documentation/TestingComponents.md +0 -111
  294. package/front_end/ui/components/docs/component_docs.ts +0 -24
  295. package/front_end/ui/components/docs/component_docs_styles.css +0 -53
  296. package/front_end/ui/components/docs/create_breadcrumbs.ts +0 -44
  297. package/front_end/ui/components/docs/slider/basic.html +0 -20
  298. package/front_end/ui/components/docs/switch/basic.html +0 -20
  299. /package/front_end/models/issues_manager/descriptions/{genericFormAriaLabelledByToNonExistingId.md → genericFormAriaLabelledByToNonExistingIdError.md} +0 -0
  300. /package/front_end/models/issues_manager/descriptions/{genericFormLabelHasNeitherForNorNestedInput.md → genericFormLabelHasNeitherForNorNestedInputError.md} +0 -0
  301. /package/front_end/{core/platform → ui/legacy}/DOMUtilities.ts +0 -0
package/.stylelintrc.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "extends": "stylelint-config-standard",
3
- "plugins": ["./scripts/stylelint_rules/lib/use_theme_colors.mjs"],
3
+ "plugins": [
4
+ "./scripts/stylelint_rules/lib/use_theme_colors.mjs",
5
+ "./scripts/stylelint_rules/lib/check_highlight_scope.mjs"
6
+ ],
4
7
  "rules": {
5
8
  "plugin/use_theme_colors": true,
9
+ "plugin/check_highlight_scope": true,
6
10
  "alpha-value-notation": "percentage",
7
11
  "color-function-notation": "modern",
8
12
  "hue-degree-notation": "angle",
@@ -217,12 +217,12 @@ Below is a detailed description of what happens in such a build:
217
217
  - It does a `bot_update` of its own
218
218
  - Generates the GN files (`gn` step)
219
219
  - Compiles (`compile`) the project
220
- - Reads the e2e_non_hosted test lists
220
+ - Reads the e2e test lists
221
221
  - Creates a CAS archive with project and the compilation output
222
222
  - Outputs the `compilator_properties`
223
223
  - Once the compilator is done we read the `compilator_properties` to find
224
224
  - the `cas_digest` to be used when triggering tests on swarming
225
- - the `e2e_non_hosted_test_list` for sharding the e2e tests execution
225
+ - the `e2e_test_list` for sharding the e2e tests execution
226
226
  - Write the e2e test list at the location where building would have written it
227
227
  - The default test run phase starts at `Run tests` step:
228
228
  - We trigger all tests on swarming in parallel (`Trigger Tests`) substep.
@@ -29,7 +29,7 @@ tokens**](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/design
29
29
  name e.g. `--sys-color-error-container`). They reference palette tokens and
30
30
  incorporate light / dark mode switches and should be used in the code directly.
31
31
  You can view all system tokens in their light and dark variant when running the
32
- component server with `npm run components-server` under *Theme Colors*.
32
+ component server on our [component documentation page](https://chromedevtools.github.io/devtools-frontend/#ThemeColors).
33
33
 
34
34
  [**Application
35
35
  tokens**](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/application_tokens.css)
package/eslint.config.mjs CHANGED
@@ -10,7 +10,7 @@ import jsdocPlugin from 'eslint-plugin-jsdoc';
10
10
  import litPlugin from 'eslint-plugin-lit';
11
11
  import mochaPlugin from 'eslint-plugin-mocha';
12
12
  import globals from 'globals';
13
- import { join } from 'path';
13
+ import { join } from 'node:path';
14
14
  import typescriptEslint from 'typescript-eslint';
15
15
 
16
16
  import devToolsPlugin from './scripts/eslint_rules/plugin.mjs';
@@ -284,6 +284,7 @@ export default defineConfig([
284
284
  },
285
285
  },
286
286
  ],
287
+ 'import/enforce-node-protocol-usage': ['error', 'always'],
287
288
  // Try to spot '// console.log()' left over from debugging
288
289
  '@devtools/no-commented-out-console': 'error',
289
290
  // Prevent imports being commented out rather than deleted.
@@ -1,7 +1,7 @@
1
1
  // Copyright 2020 The Chromium Authors
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
- const path = require('path');
4
+ const path = require('node:path');
5
5
 
6
6
  const {writeIfChanged} = require('../../scripts/build/ninja/write-if-changed.js');
7
7
  const [, , buildTimestamp, targetGenDir, targetName, ...imageSources] = process.argv;
@@ -1,3 +1,10 @@
1
1
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M9.25 3V14.125L7.062 11.938L6 13L10 17L14 13L12.938 11.938L10.75 14.125V3H9.25Z" fill="black"/>
2
+ <g clip-path="url(#clip0_4041_3016)">
3
+ <path d="M9.25 4H10.75V13.125L14.9375 8.9375L16 10L10 16L4 10L5.0625 8.9375L9.25 13.125V4Z" fill="black"/>
4
+ </g>
5
+ <defs>
6
+ <clipPath id="clip0_4041_3016">
7
+ <rect width="20" height="20" fill="white"/>
8
+ </clipPath>
9
+ </defs>
3
10
  </svg>
@@ -1,3 +1,10 @@
1
1
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M9.25 17V5.875L7.062 8.062L6 7L10 3L14 7L12.938 8.062L10.75 5.875V17H9.25Z" fill="black"/>
2
+ <g clip-path="url(#clip0_4041_3013)">
3
+ <path d="M9.25 16V6.875L5.0625 11.0625L4 10L10 4L16 10L14.9375 11.0625L10.75 6.875V16H9.25Z" fill="black"/>
4
+ </g>
5
+ <defs>
6
+ <clipPath id="clip0_4041_3013">
7
+ <rect width="20" height="20" fill="white"/>
8
+ </clipPath>
9
+ </defs>
3
10
  </svg>
@@ -33,7 +33,6 @@ import * as StringOutputStream from './StringOutputStream.js';
33
33
  import * as TextDictionary from './TextDictionary.js';
34
34
  import * as Throttler from './Throttler.js';
35
35
  import * as Trie from './Trie.js';
36
- import * as Worker from './Worker.js';
37
36
 
38
37
  /*
39
38
  * This is re-exported here because we moved UIString into platform from
@@ -73,5 +72,4 @@ export {
73
72
  TextDictionary,
74
73
  Throttler,
75
74
  Trie,
76
- Worker,
77
75
  };
@@ -733,7 +733,7 @@ export function convertToUserTierEnum(userTier: string|undefined): UserTier {
733
733
  return UserTier.PUBLIC;
734
734
  }
735
735
  }
736
- return UserTier.BETA;
736
+ return UserTier.PUBLIC;
737
737
  }
738
738
 
739
739
  let hostConfigTrackerInstance: HostConfigTracker|undefined;
@@ -549,7 +549,6 @@ export const enum EnumeratedHistogram {
549
549
  LighthouseModeRun = 'DevTools.LighthouseModeRun',
550
550
  LighthouseCategoryUsed = 'DevTools.LighthouseCategoryUsed',
551
551
  SwatchActivated = 'DevTools.SwatchActivated',
552
- AnimationPlaybackRateChanged = 'DevTools.AnimationPlaybackRateChanged',
553
552
  BuiltInAiAvailability = 'DevTools.BuiltInAiAvailability',
554
553
  // LINT.ThenChange(/front_end/devtools_compatibility.js:EnumeratedHistogram)
555
554
  }
@@ -269,11 +269,6 @@ export class UserMetrics {
269
269
  EnumeratedHistogram.SwatchActivated, swatch, SwatchType.MAX_VALUE);
270
270
  }
271
271
 
272
- animationPlaybackRateChanged(playbackRate: AnimationsPlaybackRate): void {
273
- InspectorFrontendHostInstance.recordEnumeratedHistogram(
274
- EnumeratedHistogram.AnimationPlaybackRateChanged, playbackRate, AnimationsPlaybackRate.MAX_VALUE);
275
- }
276
-
277
272
  workspacesPopulated(wallClockTimeInMilliseconds: number): void {
278
273
  InspectorFrontendHostInstance.recordPerformanceHistogram(
279
274
  'DevTools.Workspaces.PopulateWallClocktime', wallClockTimeInMilliseconds);
@@ -3,7 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  const glob = require('glob');
6
- const path = require('path');
6
+ const path = require('node:path');
7
7
  const yargs = require('yargs');
8
8
  const {hideBin} = require('yargs/helpers');
9
9
 
@@ -2,7 +2,7 @@
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
- const path = require('path');
5
+ const path = require('node:path');
6
6
  const yargs = require('yargs');
7
7
  const {hideBin} = require('yargs/helpers');
8
8
 
@@ -0,0 +1,25 @@
1
+ // Copyright 2025 The Chromium Authors
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ import type * as Api from './api/api.js';
6
+
7
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
8
+ // @ts-ignore 'process' is not available when type-checking against browser types.
9
+ export const IS_NODE = typeof (process as unknown) !== 'undefined' && process.versions?.node !== null;
10
+
11
+ export const IS_BROWSER =
12
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
13
+ // @ts-ignore 'window' is not available when type-checking against node.js types.
14
+ typeof window !== 'undefined' || (typeof self !== 'undefined' && typeof self.postMessage === 'function');
15
+
16
+ export const HOST_RUNTIME = await (async(): Promise<Api.HostRuntime.HostRuntime> => {
17
+ if (IS_NODE) {
18
+ return (await import('./node/node.js')).HostRuntime.HOST_RUNTIME;
19
+ }
20
+ if (IS_BROWSER) {
21
+ return (await import('./browser/browser.js')).HostRuntime.HOST_RUNTIME;
22
+ }
23
+
24
+ throw new Error('Unknown runtime!');
25
+ })();
@@ -29,10 +29,10 @@ export function keyIsArrowKey(key: string): key is ArrowKey {
29
29
  return ARROW_KEYS.has(key as ArrowKey);
30
30
  }
31
31
 
32
- export function isEscKey(event: KeyboardEvent): boolean {
32
+ export function isEscKey(event: {readonly key: string}): boolean {
33
33
  return event.key === 'Escape';
34
34
  }
35
35
 
36
- export function isEnterOrSpaceKey(event: KeyboardEvent): boolean {
36
+ export function isEnterOrSpaceKey(event: {readonly key: string}): boolean {
37
37
  return event.key === 'Enter' || event.key === ' ';
38
38
  }
@@ -584,5 +584,5 @@ export const concatBase64 = function(lhs: string, rhs: string): string {
584
584
  }
585
585
  const lhsLeaveAsIs = lhs.substring(0, lhs.length - 4);
586
586
  const lhsToDecode = lhs.substring(lhs.length - 4);
587
- return lhsLeaveAsIs + window.btoa(window.atob(lhsToDecode) + window.atob(rhs));
587
+ return lhsLeaveAsIs + globalThis.btoa(globalThis.atob(lhsToDecode) + globalThis.atob(rhs));
588
588
  };
@@ -0,0 +1,45 @@
1
+ // Copyright 2025 The Chromium Authors
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ /**
6
+ * Provides abstractions for host features that require different implementations depending
7
+ * on whether DevTools runs in the browser or Node.js
8
+ */
9
+ export interface HostRuntime {
10
+ createWorker(url: string): Worker;
11
+ workerScope: WorkerScope;
12
+ }
13
+
14
+ /**
15
+ * Abstracts away the differences between browser web workers and Node.js worker threads.
16
+ */
17
+ export interface Worker {
18
+ postMessage(message: unknown, transfer?: WorkerTransferable[]): void;
19
+
20
+ dispose(): void;
21
+ terminate(immediately?: boolean): void;
22
+
23
+ set onmessage(listener: (event: WorkerMessageEvent) => void);
24
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
25
+ set onerror(listener: (event: any) => void);
26
+ }
27
+
28
+ /**
29
+ * Currently we ony transfer MessagePorts to workers, but it's possible to add
30
+ * more things (like ReadableStream) as long as it's present in all runtimes.
31
+ */
32
+ export type WorkerTransferable = typeof MessagePort.prototype;
33
+
34
+ /**
35
+ * Used by workers to communicate with their parent.
36
+ */
37
+ export interface WorkerScope {
38
+ postMessage(message: unknown): void;
39
+ set onmessage(listener: (event: WorkerMessageEvent) => void);
40
+ }
41
+
42
+ export interface WorkerMessageEvent {
43
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
44
+ readonly data: any;
45
+ }
@@ -0,0 +1,7 @@
1
+ // Copyright 2025 The Chromium Authors
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ import * as HostRuntime from './HostRuntime.js';
6
+
7
+ export {HostRuntime};
@@ -1,18 +1,30 @@
1
- // Copyright 2014 The Chromium Authors
1
+ // Copyright 2025 The Chromium Authors
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
- export class WorkerWrapper {
5
+ import type * as Api from '../api/api.js';
6
+
7
+ class WebWorkerScope implements Api.HostRuntime.WorkerScope {
8
+ postMessage(message: unknown): void {
9
+ self.postMessage(message);
10
+ }
11
+
12
+ set onmessage(listener: (event: Api.HostRuntime.WorkerMessageEvent) => void) {
13
+ self.onmessage = listener;
14
+ }
15
+ }
16
+
17
+ class WebWorker implements Api.HostRuntime.Worker {
6
18
  readonly #workerPromise: Promise<Worker>;
7
19
  #disposed?: boolean;
8
20
  #rejectWorkerPromise?: (error: Error) => void;
9
21
 
10
- private constructor(workerLocation: URL) {
22
+ constructor(workerLocation: string) {
11
23
  this.#workerPromise = new Promise((fulfill, reject) => {
12
24
  this.#rejectWorkerPromise = reject;
13
- const worker = new Worker(workerLocation, {type: 'module'});
25
+ const worker = new Worker(new URL(workerLocation), {type: 'module'});
14
26
  worker.onerror = event => {
15
- console.error(`Failed to load worker for ${workerLocation.href}:`, event);
27
+ console.error(`Failed to load worker for ${workerLocation}:`, event);
16
28
  };
17
29
  worker.onmessage = (event: MessageEvent<unknown>) => {
18
30
  console.assert(event.data === 'workerReady');
@@ -22,11 +34,7 @@ export class WorkerWrapper {
22
34
  });
23
35
  }
24
36
 
25
- static fromURL(url: URL): WorkerWrapper {
26
- return new WorkerWrapper(url);
27
- }
28
-
29
- postMessage(message: unknown, transfer?: Transferable[]): void {
37
+ postMessage(message: unknown, transfer?: Api.HostRuntime.WorkerTransferable[]): void {
30
38
  void this.#workerPromise.then(worker => {
31
39
  if (!this.#disposed) {
32
40
  worker.postMessage(message, transfer ?? []);
@@ -46,15 +54,22 @@ export class WorkerWrapper {
46
54
  this.dispose();
47
55
  }
48
56
 
49
- set onmessage(listener: (event: MessageEvent) => void) {
57
+ set onmessage(listener: (event: Api.HostRuntime.WorkerMessageEvent) => void) {
50
58
  void this.#workerPromise.then(worker => {
51
59
  worker.onmessage = listener;
52
60
  });
53
61
  }
54
62
 
55
- set onerror(listener: (event: Event) => void) {
63
+ set onerror(listener: (event: unknown) => void) {
56
64
  void this.#workerPromise.then(worker => {
57
65
  worker.onerror = listener;
58
66
  });
59
67
  }
60
68
  }
69
+
70
+ export const HOST_RUNTIME: Api.HostRuntime.HostRuntime = {
71
+ createWorker(url: string): Api.HostRuntime.Worker {
72
+ return new WebWorker(url);
73
+ },
74
+ workerScope: new WebWorkerScope(),
75
+ };
@@ -0,0 +1,7 @@
1
+ // Copyright 2025 The Chromium Authors
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ import * as HostRuntime from './HostRuntime.js';
6
+
7
+ export {HostRuntime};
@@ -0,0 +1,85 @@
1
+ // Copyright 2025 The Chromium Authors
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ import * as WorkerThreads from 'node:worker_threads';
6
+
7
+ import type * as Api from '../api/api.js';
8
+
9
+ class NodeWorkerScope implements Api.HostRuntime.WorkerScope {
10
+ postMessage(message: unknown): void {
11
+ WorkerThreads.parentPort?.postMessage(message);
12
+ }
13
+
14
+ set onmessage(listener: (event: Api.HostRuntime.WorkerMessageEvent) => void) {
15
+ WorkerThreads.parentPort?.on('message', data => {
16
+ listener({data});
17
+ });
18
+ }
19
+ }
20
+
21
+ class NodeWorker implements Api.HostRuntime.Worker {
22
+ readonly #workerPromise: Promise<WorkerThreads.Worker>;
23
+ #disposed = false;
24
+ #rejectWorkerPromise?: (error: Error) => void;
25
+
26
+ constructor(url: string) {
27
+ this.#workerPromise = new Promise((resolve, reject) => {
28
+ this.#rejectWorkerPromise = reject;
29
+ const worker = new WorkerThreads.Worker(new URL(url));
30
+ worker.once('message', (message: unknown) => {
31
+ if (message === 'workerReady') {
32
+ resolve(worker);
33
+ }
34
+ });
35
+ worker.on('error', reject);
36
+ });
37
+ }
38
+
39
+ postMessage(message: unknown): void {
40
+ void this.#workerPromise.then(worker => {
41
+ if (!this.#disposed) {
42
+ worker.postMessage(message);
43
+ }
44
+ });
45
+ }
46
+
47
+ dispose(): void {
48
+ this.#disposed = true;
49
+ void this.#workerPromise.then(worker => worker.terminate());
50
+ }
51
+
52
+ terminate(immediately?: boolean): void {
53
+ if (immediately) {
54
+ this.#rejectWorkerPromise?.(new Error('Worker terminated'));
55
+ }
56
+ this.dispose();
57
+ }
58
+
59
+ set onmessage(listener: (event: unknown) => void) {
60
+ void this.#workerPromise.then(worker => {
61
+ worker.on('message', data => {
62
+ if (!this.#disposed) {
63
+ listener({data});
64
+ }
65
+ });
66
+ });
67
+ }
68
+
69
+ set onerror(listener: (event: unknown) => void) {
70
+ void this.#workerPromise.then(worker => {
71
+ worker.on('error', (error: Error) => {
72
+ if (!this.#disposed) {
73
+ listener({type: 'error', ...error});
74
+ }
75
+ });
76
+ });
77
+ }
78
+ }
79
+
80
+ export const HOST_RUNTIME: Api.HostRuntime.HostRuntime = {
81
+ createWorker(url: string): Api.HostRuntime.Worker {
82
+ return new NodeWorker(url);
83
+ },
84
+ workerScope: new NodeWorkerScope(),
85
+ };
@@ -0,0 +1,7 @@
1
+ // Copyright 2025 The Chromium Authors
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ import * as HostRuntime from './HostRuntime.js';
6
+
7
+ export {HostRuntime};
@@ -7,7 +7,7 @@ import * as Brand from './Brand.js';
7
7
  import * as Constructor from './Constructor.js';
8
8
  import * as DateUtilities from './DateUtilities.js';
9
9
  import * as DevToolsPath from './DevToolsPath.js';
10
- import * as DOMUtilities from './DOMUtilities.js';
10
+ import * as HostRuntime from './HostRuntime.js';
11
11
  import * as KeyboardUtilities from './KeyboardUtilities.js';
12
12
  import * as MapUtilities from './MapUtilities.js';
13
13
  import * as MimeType from './MimeType.js';
@@ -31,7 +31,7 @@ export {
31
31
  Constructor,
32
32
  DateUtilities,
33
33
  DevToolsPath,
34
- DOMUtilities,
34
+ HostRuntime,
35
35
  KeyboardUtilities,
36
36
  MapUtilities,
37
37
  MimeType,
@@ -375,7 +375,7 @@ export class AnimationModel extends SDKModel<EventTypes> {
375
375
  const animation = await AnimationImpl.parsePayload(this, payload);
376
376
  // Ignore Web Animations custom effects & groups.
377
377
  const keyframesRule = animation.source().keyframesRule();
378
- if (animation.type() === 'WebAnimation' && keyframesRule && keyframesRule.keyframes().length === 0) {
378
+ if (animation.type() === 'WebAnimation' && keyframesRule?.keyframes().length === 0) {
379
379
  this.#pendingAnimations.delete(animation.id());
380
380
  } else {
381
381
  this.#animationsById.set(animation.id(), animation);
@@ -190,7 +190,7 @@ export class CSSModel extends SDKModel<EventTypes> {
190
190
 
191
191
  const {styles} =
192
192
  await this.agent.invoke_setStyleTexts({edits: [{styleSheetId, range: range.serializeToObject(), text}]});
193
- if (!styles || styles.length !== 1) {
193
+ if (styles?.length !== 1) {
194
194
  return false;
195
195
  }
196
196
 
@@ -292,7 +292,7 @@ export class CSSProperty extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
292
292
  }
293
293
  if (cssMetadata().isGridAreaDefiningProperty(propertyName)) {
294
294
  const rowResult = GridAreaRowRegex.exec(token);
295
- if (rowResult && rowResult.index === 0 && !propertyText.trimEnd().endsWith(']')) {
295
+ if (rowResult?.index === 0 && !propertyText.trimEnd().endsWith(']')) {
296
296
  propertyText = propertyText.trimEnd() + '\n' + doubleIndent;
297
297
  }
298
298
  }
@@ -1237,7 +1237,7 @@ export class AnchorFunctionMatcher extends matcherBase(AnchorFunctionMatch) {
1237
1237
  if (node.name === 'VariableName') {
1238
1238
  // Double-dashed anchor reference to be rendered with a link to its matching anchor.
1239
1239
  let parent = node.parent;
1240
- if (!parent || parent.name !== 'ArgList') {
1240
+ if (parent?.name !== 'ArgList') {
1241
1241
  return null;
1242
1242
  }
1243
1243
  parent = parent.parent;
@@ -432,7 +432,7 @@ export class ConsoleModel extends SDKModel<EventTypes> {
432
432
  const callFunctionResult =
433
433
  await globalObject.callFunction(saveVariable, [RemoteObject.toCallArgument(remoteObject)]);
434
434
  globalObject.release();
435
- if (callFunctionResult.wasThrown || !callFunctionResult.object || callFunctionResult.object.type !== 'string') {
435
+ if (callFunctionResult.wasThrown || callFunctionResult.object?.type !== 'string') {
436
436
  failedToSave(callFunctionResult.object || null);
437
437
  } else {
438
438
  const text = (callFunctionResult.object.value as string);
@@ -278,7 +278,7 @@ export class Cookie {
278
278
  // extension cookie tests currently use the funtionality, and if we
279
279
  // ever decide to implement that it should be done by preventing
280
280
  // such cookies from being set.
281
- if (!domain || domain[0] !== '.') {
281
+ if (domain?.[0] !== '.') {
282
282
  return false;
283
283
  }
284
284
 
@@ -746,7 +746,7 @@ export class DOMNode {
746
746
  }
747
747
 
748
748
  const oldAttribute = oldAttributesMap.get(name);
749
- if (!oldAttribute || oldAttribute.value !== value) {
749
+ if (oldAttribute?.value !== value) {
750
750
  attributesChanged = true;
751
751
  }
752
752
  }
@@ -1671,7 +1671,7 @@ export class DOMModel extends SDKModel<EventTypes> {
1671
1671
  }
1672
1672
  const {nodeIds} =
1673
1673
  await this.agent.invoke_getSearchResults({searchId: this.#searchId, fromIndex: index, toIndex: index + 1});
1674
- return nodeIds && nodeIds.length === 1 ? this.nodeForId(nodeIds[0]) : null;
1674
+ return nodeIds?.length === 1 ? this.nodeForId(nodeIds[0]) : null;
1675
1675
  }
1676
1676
 
1677
1677
  private cancelSearch(): void {
@@ -858,7 +858,7 @@ export class DebuggerModel extends SDKModel<EventTypes> {
858
858
  let functionName: RemoteObject|null = null;
859
859
  if (response.properties) {
860
860
  for (const prop of response.properties) {
861
- if (prop.name === 'name' && prop.value && prop.value.type === 'string') {
861
+ if (prop.name === 'name' && prop.value?.type === 'string') {
862
862
  functionName = prop.value;
863
863
  }
864
864
  }
@@ -1502,6 +1502,12 @@ export class NetworkDispatcher implements ProtocolProxyApi.NetworkDispatcher {
1502
1502
  this.updateNetworkRequest(networkRequest);
1503
1503
  }
1504
1504
 
1505
+ directUDPSocketJoinedMulticastGroup(_event: Protocol.Network.DirectUDPSocketJoinedMulticastGroupEvent): void {
1506
+ }
1507
+
1508
+ directUDPSocketLeftMulticastGroup(_event: Protocol.Network.DirectUDPSocketLeftMulticastGroupEvent): void {
1509
+ }
1510
+
1505
1511
  trustTokenOperationDone(event: Protocol.Network.TrustTokenOperationDoneEvent): void {
1506
1512
  const request = this.#requestsById.get(event.requestId);
1507
1513
  if (!request) {
@@ -47,7 +47,7 @@ export class PreloadingModel extends SDKModel<EventTypes> {
47
47
  void this.agent.invoke_enable();
48
48
 
49
49
  const targetInfo = target.targetInfo();
50
- if (targetInfo !== undefined && targetInfo.subtype === 'prerender') {
50
+ if (targetInfo?.subtype === 'prerender') {
51
51
  this.lastPrimaryPageModel = TargetManager.instance().primaryPageTarget()?.model(PreloadingModel) || null;
52
52
  }
53
53
 
@@ -970,7 +970,7 @@ export class RemoteArray {
970
970
  }
971
971
 
972
972
  static objectAsArray(object: RemoteObject|null): RemoteArray {
973
- if (!object || object.type !== 'object' || (object.subtype !== 'array' && object.subtype !== 'typedarray')) {
973
+ if (object?.type !== 'object' || (object.subtype !== 'array' && object.subtype !== 'typedarray')) {
974
974
  throw new Error('Object is empty or not an array');
975
975
  }
976
976
  return new RemoteArray(object);
@@ -891,7 +891,7 @@ export class ResourceTreeFrame {
891
891
 
892
892
  addRequest(request: NetworkRequest): void {
893
893
  let resource = this.resourcesMap.get(request.url());
894
- if (resource && resource.request === request) {
894
+ if (resource?.request === request) {
895
895
  // Already in the tree, we just got an extra update.
896
896
  return;
897
897
  }
@@ -27,7 +27,7 @@
27
27
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
28
  */
29
29
 
30
- import type * as Platform from '../../core/platform/platform.js';
30
+ import * as Platform from '../../core/platform/platform.js';
31
31
  import * as Protocol from '../../generated/protocol.js';
32
32
  import * as TextUtils from '../../models/text_utils/text_utils.js';
33
33
  import * as Common from '../common/common.js';
@@ -504,10 +504,10 @@ function frameIdForScript(script: Script): Protocol.Page.FrameId|null {
504
504
  export const sourceURLRegex = /^[\x20\t]*\/\/[@#] sourceURL=\s*(\S*?)\s*$/;
505
505
 
506
506
  export async function disassembleWasm(content: string): Promise<TextUtils.WasmDisassembly.WasmDisassembly> {
507
- const worker = Common.Worker.WorkerWrapper.fromURL(
508
- new URL('../../entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.js', import.meta.url));
507
+ const worker = Platform.HostRuntime.HOST_RUNTIME.createWorker(
508
+ new URL('../../entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.js', import.meta.url).toString());
509
509
  const promise = new Promise<TextUtils.WasmDisassembly.WasmDisassembly>((resolve, reject) => {
510
- worker.onmessage = ({data}: MessageEvent) => {
510
+ worker.onmessage = ({data}) => {
511
511
  if ('method' in data) {
512
512
  switch (data.method) {
513
513
  case 'disassemble':