chrome-devtools-frontend 1.0.1524741 → 1.0.1526203

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 (66) hide show
  1. package/docs/policy/slow-close.md +22 -19
  2. package/front_end/core/common/Settings.ts +1 -1
  3. package/front_end/core/sdk/PreloadingModel.ts +3 -0
  4. package/front_end/core/sdk/ResourceTreeModel.ts +1 -1
  5. package/front_end/{models/source_map_scopes → core/sdk}/ScopeTreeCache.ts +8 -7
  6. package/front_end/core/sdk/SourceMapScopesInfo.ts +57 -0
  7. package/front_end/core/sdk/sdk.ts +2 -0
  8. package/front_end/entrypoints/formatter_worker/FormatterActions.ts +7 -0
  9. package/front_end/entrypoints/formatter_worker/ScopeParser.ts +15 -12
  10. package/front_end/generated/InspectorBackendCommands.js +4 -4
  11. package/front_end/generated/SupportedCSSProperties.js +0 -19
  12. package/front_end/generated/protocol-mapping.d.ts +1 -1
  13. package/front_end/generated/protocol-proxy-api.d.ts +1 -1
  14. package/front_end/generated/protocol.ts +9 -8
  15. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +43 -8
  16. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +50 -32
  17. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +29 -29
  18. package/front_end/models/formatter/FormatterWorkerPool.ts +1 -1
  19. package/front_end/models/javascript_metadata/NativeFunctions.js +3 -8
  20. package/front_end/models/source_map_scopes/NamesResolver.ts +1 -3
  21. package/front_end/models/source_map_scopes/source_map_scopes.ts +0 -2
  22. package/front_end/models/trace/handlers/UserTimingsHandler.ts +1 -1
  23. package/front_end/models/trace/insights/CLSCulprits.ts +2 -1
  24. package/front_end/models/trace/insights/Cache.ts +2 -1
  25. package/front_end/models/trace/insights/DOMSize.ts +2 -1
  26. package/front_end/models/trace/insights/DocumentLatency.ts +2 -1
  27. package/front_end/models/trace/insights/DuplicatedJavaScript.ts +2 -1
  28. package/front_end/models/trace/insights/FontDisplay.ts +2 -1
  29. package/front_end/models/trace/insights/ForcedReflow.ts +2 -1
  30. package/front_end/models/trace/insights/INPBreakdown.ts +2 -1
  31. package/front_end/models/trace/insights/ImageDelivery.ts +2 -1
  32. package/front_end/models/trace/insights/LCPBreakdown.ts +2 -1
  33. package/front_end/models/trace/insights/LCPDiscovery.ts +2 -1
  34. package/front_end/models/trace/insights/LegacyJavaScript.ts +2 -1
  35. package/front_end/models/trace/insights/ModernHTTP.ts +2 -1
  36. package/front_end/models/trace/insights/NetworkDependencyTree.ts +2 -1
  37. package/front_end/models/trace/insights/RenderBlocking.ts +2 -1
  38. package/front_end/models/trace/insights/SlowCSSSelector.ts +2 -1
  39. package/front_end/models/trace/insights/ThirdParties.ts +2 -1
  40. package/front_end/models/trace/insights/Viewport.ts +2 -1
  41. package/front_end/models/trace/insights/types.ts +2 -1
  42. package/front_end/panels/application/ReportingApiView.ts +8 -7
  43. package/front_end/panels/application/StorageView.ts +2 -1
  44. package/front_end/panels/application/preloading/components/PreloadingString.ts +2 -0
  45. package/front_end/panels/changes/ChangesSidebar.ts +10 -3
  46. package/front_end/panels/changes/ChangesView.ts +69 -69
  47. package/front_end/panels/changes/CombinedDiffView.ts +1 -1
  48. package/front_end/panels/changes/changesView.css +4 -0
  49. package/front_end/panels/console/ConsolePrompt.ts +24 -4
  50. package/front_end/panels/lighthouse/LighthouseController.ts +5 -0
  51. package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +43 -46
  52. package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +254 -153
  53. package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +28 -21
  54. package/front_end/panels/timeline/TimelinePanel.ts +10 -8
  55. package/front_end/panels/timeline/components/ExportTraceOptions.ts +1 -1
  56. package/front_end/third_party/chromium/README.chromium +1 -1
  57. package/front_end/ui/components/buttons/Button.ts +17 -0
  58. package/front_end/ui/components/docs/linear_memory_inspector/basic.ts +21 -9
  59. package/front_end/ui/components/highlighting/HighlightManager.ts +21 -1
  60. package/front_end/ui/components/tooltips/Tooltip.ts +22 -5
  61. package/front_end/ui/legacy/SearchableView.ts +1 -1
  62. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +48 -5
  63. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +2 -2
  64. package/front_end/ui/legacy/components/source_frame/JSONView.ts +28 -0
  65. package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +18 -20
  66. package/package.json +22 -22
@@ -55,6 +55,7 @@ We can break this time down into the 4 phases that combine to make the LCP time:
55
55
  ## Estimated savings: none
56
56
 
57
57
  ## External resources:
58
+ - https://developer.chrome.com/docs/performance/insights/lcp-breakdown
58
59
  - https://web.dev/articles/lcp
59
60
  - https://web.dev/articles/optimize-lcp
60
61
  === end content
@@ -100,6 +101,7 @@ We can break this time down into the 4 phases that combine to make the LCP time:
100
101
  ## Estimated savings: none
101
102
 
102
103
  ## External resources:
104
+ - https://developer.chrome.com/docs/performance/insights/lcp-breakdown
103
105
  - https://web.dev/articles/lcp
104
106
  - https://web.dev/articles/optimize-lcp
105
107
  === end content
@@ -123,6 +125,7 @@ We can break this time down into the 2 phases that combine to make the LCP time:
123
125
  ## Estimated savings: none
124
126
 
125
127
  ## External resources:
128
+ - https://developer.chrome.com/docs/performance/insights/lcp-breakdown
126
129
  - https://web.dev/articles/lcp
127
130
  - https://web.dev/articles/optimize-lcp
128
131
  === end content
@@ -140,6 +143,7 @@ There are no network requests that are render blocking.
140
143
  ## Estimated savings: FCP 0 ms, LCP 0 ms
141
144
 
142
145
  ## External resources:
146
+ - https://developer.chrome.com/docs/performance/insights/render-blocking
143
147
  - https://web.dev/articles/lcp
144
148
  - https://web.dev/articles/optimize-lcp
145
149
  === end content
@@ -168,6 +172,7 @@ allUrls = [0: https://code.jquery.com/jquery-3.7.1.js, 1: http://localhost:8000/
168
172
  ## Estimated savings: FCP 2015 ms, LCP 0 ms
169
173
 
170
174
  ## External resources:
175
+ - https://developer.chrome.com/docs/performance/insights/render-blocking
171
176
  - https://web.dev/articles/lcp
172
177
  - https://web.dev/articles/optimize-lcp
173
178
  === end content
@@ -227,6 +232,7 @@ The result of the checks for this insight are:
227
232
  ## Estimated savings: none
228
233
 
229
234
  ## External resources:
235
+ - https://developer.chrome.com/docs/performance/insights/lcp-discovery
230
236
  - https://web.dev/articles/lcp
231
237
  - https://web.dev/articles/optimize-lcp
232
238
  === end content
@@ -288,6 +294,7 @@ The result of the checks for this insight are:
288
294
  ## Estimated savings: FCP 3428 ms, LCP 3428 ms
289
295
 
290
296
  ## External resources:
297
+ - https://developer.chrome.com/docs/performance/insights/document-latency
291
298
  - https://web.dev/articles/optimize-ttfb
292
299
  === end content
293
300
 
@@ -334,6 +341,7 @@ Layout shifts in this cluster:
334
341
  ## Estimated savings: none
335
342
 
336
343
  ## External resources:
344
+ - https://developer.chrome.com/docs/performance/insights/cls-culprit
337
345
  - https://web.dev/articles/cls
338
346
  - https://web.dev/articles/optimize-cls
339
347
  === end content
@@ -354,6 +362,7 @@ No layout shifts were found.
354
362
  ## Estimated savings: none
355
363
 
356
364
  ## External resources:
365
+ - https://developer.chrome.com/docs/performance/insights/cls-culprit
357
366
  - https://web.dev/articles/cls
358
367
  - https://web.dev/articles/optimize-cls
359
368
  === end content
@@ -432,6 +441,7 @@ Layout shifts in this cluster:
432
441
  ## Estimated savings: none
433
442
 
434
443
  ## External resources:
444
+ - https://developer.chrome.com/docs/performance/insights/cls-culprit
435
445
  - https://web.dev/articles/cls
436
446
  - https://web.dev/articles/optimize-cls
437
447
  === end content
@@ -463,6 +473,7 @@ The longest interaction on the page was a `click` which had a total duration of
463
473
  ## Estimated savings: none
464
474
 
465
475
  ## External resources:
476
+ - https://developer.chrome.com/docs/performance/insights/inp-breakdown
466
477
  - https://web.dev/articles/inp
467
478
  - https://web.dev/explore/how-to-optimize-inp
468
479
  - https://web.dev/articles/optimize-long-tasks
@@ -489,6 +500,7 @@ There are no requests that were served over a legacy HTTP protocol.
489
500
  ## Estimated savings: none
490
501
 
491
502
  ## External resources:
503
+ - https://developer.chrome.com/docs/performance/insights/modern-http
492
504
  - https://developer.chrome.com/docs/lighthouse/best-practices/uses-http2
493
505
  === end content
494
506
 
@@ -526,6 +538,7 @@ allUrls = [0: https://ads.jetpackdigital.com/sites/_uploads/1742278386bg_opt_640
526
538
  ## Estimated savings: FCP 0 ms, LCP 0 ms
527
539
 
528
540
  ## External resources:
541
+ - https://developer.chrome.com/docs/performance/insights/modern-http
529
542
  - https://developer.chrome.com/docs/lighthouse/best-practices/uses-http2
530
543
  === end content
531
544
 
@@ -546,6 +559,7 @@ No DOM size issues were detected.
546
559
  ## Estimated savings: none
547
560
 
548
561
  ## External resources:
562
+ - https://developer.chrome.com/docs/performance/insights/dom-size
549
563
  - https://developer.chrome.com/docs/lighthouse/performance/dom-size/
550
564
  === end content
551
565
 
@@ -561,7 +575,7 @@ This insight evaluates some key metrics about the Document Object Model (DOM) an
561
575
  - The largest layout and style recalculation events.
562
576
 
563
577
  ## Detailed analysis:
564
- A large DOM can increase the duration of style calculations and layout reflows, impacting page responsiveness. A large DOM will also increase memory usage. [Learn how to avoid an excessive DOM size](https://developer.chrome.com/docs/lighthouse/performance/dom-size/).
578
+ A large DOM can increase the duration of style calculations and layout reflows, impacting page responsiveness. A large DOM will also increase memory usage. [Learn how to avoid an excessive DOM size](https://developer.chrome.com/docs/performance/insights/dom-size).
565
579
 
566
580
  Statistic:
567
581
 
@@ -577,6 +591,7 @@ Large layout updates/style calculations:
577
591
  ## Estimated savings: none
578
592
 
579
593
  ## External resources:
594
+ - https://developer.chrome.com/docs/performance/insights/dom-size
580
595
  - https://developer.chrome.com/docs/lighthouse/performance/dom-size/
581
596
  === end content
582
597
 
@@ -636,6 +651,7 @@ Duplication grouped by Node modules: - Source: node_modules/filestack-js - Dupli
636
651
  ## Estimated savings: FCP 100 ms, LCP 100 ms
637
652
 
638
653
  ## External resources:
654
+ - https://developer.chrome.com/docs/performance/insights/duplicated-javascript
639
655
  === end content
640
656
 
641
657
  Title: PerformanceInsightFormatter Duplicated javascript serializes no details if there is no duplicate javascript
@@ -652,6 +668,7 @@ There is no duplicated JavaScript in the page modules
652
668
  ## Estimated savings: none
653
669
 
654
670
  ## External resources:
671
+ - https://developer.chrome.com/docs/performance/insights/duplicated-javascript
655
672
  === end content
656
673
 
657
674
  Title: PerformanceInsightFormatter Legacy JavaScript serializes the correct details when there is no legacy javascript in modules
@@ -669,6 +686,7 @@ There is no significant amount of legacy JavaScript on the page.
669
686
  ## Estimated savings: none
670
687
 
671
688
  ## External resources:
689
+ - https://developer.chrome.com/docs/performance/insights/legacy-javascript
672
690
  - https://web.dev/articles/baseline-and-polyfills
673
691
  - https://philipwalton.com/articles/the-state-of-es5-on-the-web/
674
692
  === end content
@@ -735,6 +753,7 @@ Line: 0, Column: 390688, Name: Object.values
735
753
  ## Estimated savings: FCP 0 ms, LCP 0 ms
736
754
 
737
755
  ## External resources:
756
+ - https://developer.chrome.com/docs/performance/insights/legacy-javascript
738
757
  - https://web.dev/articles/baseline-and-polyfills
739
758
  - https://philipwalton.com/articles/the-state-of-es5-on-the-web/
740
759
  === end content
@@ -752,6 +771,7 @@ No font display issues were detected.
752
771
  ## Estimated savings: FCP -Infinity ms
753
772
 
754
773
  ## External resources:
774
+ - https://developer.chrome.com/docs/performance/insights/font-display
755
775
  - https://web.dev/articles/preload-optional-fonts
756
776
  - https://fonts.google.com/knowledge/glossary/foit
757
777
  - https://developer.chrome.com/blog/font-fallbacks
@@ -774,11 +794,12 @@ The following font display issues were found:
774
794
  - Font name: EJRVQgYoZZY2vCFuvAFWzr-_dSb_.woff2, URL: https://fonts.gstatic.com/s/ptserif/v18/EJRVQgYoZZY2vCFuvAFWzr-_dSb_.woff2 (eventKey: s-5325, ts: 409057959655), Property 'font-display' set to: 'auto', Wasted time: 15 ms.
775
795
  - Font name: S6u9w4BMUTPHh6UVSwiPGQ3q5d0.woff2, URL: https://fonts.gstatic.com/s/lato/v24/S6u9w4BMUTPHh6UVSwiPGQ3q5d0.woff2 (eventKey: s-5238, ts: 409057956530), Property 'font-display' set to: 'auto', Wasted time: 10 ms.
776
796
 
777
- Consider setting [`font-display`](https://developer.chrome.com/blog/font-display) to `swap` or `optional` to ensure text is consistently visible. `swap` can be further optimized to mitigate layout shifts with [font metric overrides](https://developer.chrome.com/blog/font-fallbacks).
797
+ Consider setting [`font-display`](https://developer.chrome.com/docs/performance/insights/font-display) to `swap` or `optional` to ensure text is consistently visible. `swap` can be further optimized to mitigate layout shifts with [font metric overrides](https://developer.chrome.com/blog/font-fallbacks).
778
798
 
779
799
  ## Estimated savings: FCP 20 ms
780
800
 
781
801
  ## External resources:
802
+ - https://developer.chrome.com/docs/performance/insights/font-display
782
803
  - https://web.dev/articles/preload-optional-fonts
783
804
  - https://fonts.google.com/knowledge/glossary/foit
784
805
  - https://developer.chrome.com/blog/font-fallbacks
@@ -797,6 +818,7 @@ There are no unoptimized images on this page.
797
818
  ## Estimated savings: none
798
819
 
799
820
  ## External resources:
821
+ - https://developer.chrome.com/docs/performance/insights/image-delivery
800
822
  - https://developer.chrome.com/docs/lighthouse/performance/uses-optimized-images/
801
823
  === end content
802
824
 
@@ -841,6 +863,7 @@ This image file is larger than it needs to be (2048x1356) for its displayed dime
841
863
  ## Estimated savings: FCP 0 ms, LCP 100 ms
842
864
 
843
865
  ## External resources:
866
+ - https://developer.chrome.com/docs/performance/insights/image-delivery
844
867
  - https://developer.chrome.com/docs/lighthouse/performance/uses-optimized-images/
845
868
  === end content
846
869
 
@@ -852,13 +875,14 @@ Content:
852
875
  This insight identifies forced synchronous layouts (also known as forced reflows) and layout thrashing caused by JavaScript accessing layout properties at suboptimal points in time.
853
876
 
854
877
  ## Detailed analysis:
855
- A forced reflow occurs when JavaScript queries geometric properties (such as `offsetWidth`) after styles have been invalidated by a change to the DOM state. This can result in poor performance. Learn more about [forced reflows](https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing#avoid-forced-synchronous-layouts) and possible mitigations.
878
+ A forced reflow occurs when JavaScript queries geometric properties (such as `offsetWidth`) after styles have been invalidated by a change to the DOM state. This can result in poor performance. Learn more about [forced reflows](https://developer.chrome.com/docs/performance/insights/forced-reflow) and possible mitigations.
856
879
 
857
880
  The forced reflow checks revealed no problems.
858
881
 
859
882
  ## Estimated savings: none
860
883
 
861
884
  ## External resources:
885
+ - https://developer.chrome.com/docs/performance/insights/forced-reflow
862
886
  - https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing#avoid-forced-synchronous-layouts
863
887
  === end content
864
888
 
@@ -870,7 +894,7 @@ Content:
870
894
  This insight identifies forced synchronous layouts (also known as forced reflows) and layout thrashing caused by JavaScript accessing layout properties at suboptimal points in time.
871
895
 
872
896
  ## Detailed analysis:
873
- A forced reflow occurs when JavaScript queries geometric properties (such as `offsetWidth`) after styles have been invalidated by a change to the DOM state. This can result in poor performance. Learn more about [forced reflows](https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing#avoid-forced-synchronous-layouts) and possible mitigations.
897
+ A forced reflow occurs when JavaScript queries geometric properties (such as `offsetWidth`) after styles have been invalidated by a change to the DOM state. This can result in poor performance. Learn more about [forced reflows](https://developer.chrome.com/docs/performance/insights/forced-reflow) and possible mitigations.
874
898
 
875
899
  The forced reflow checks revealed one or more problems.
876
900
 
@@ -901,6 +925,7 @@ Stack trace (including total time):
901
925
  ## Estimated savings: none
902
926
 
903
927
  ## External resources:
928
+ - https://developer.chrome.com/docs/performance/insights/forced-reflow
904
929
  - https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing#avoid-forced-synchronous-layouts
905
930
  === end content
906
931
 
@@ -927,6 +952,7 @@ no origins were preconnected.
927
952
  ## Estimated savings: none
928
953
 
929
954
  ## External resources:
955
+ - https://developer.chrome.com/docs/performance/insights/network-dependency-tree
930
956
  - https://web.dev/learn/performance/understanding-the-critical-path
931
957
  - https://developer.chrome.com/docs/lighthouse/performance/uses-rel-preconnect/
932
958
  === end content
@@ -959,6 +985,7 @@ no origins were preconnected.
959
985
  ## Estimated savings: none
960
986
 
961
987
  ## External resources:
988
+ - https://developer.chrome.com/docs/performance/insights/network-dependency-tree
962
989
  - https://web.dev/learn/performance/understanding-the-critical-path
963
990
  - https://developer.chrome.com/docs/lighthouse/performance/uses-rel-preconnect/
964
991
  === end content
@@ -976,6 +1003,7 @@ No CSS selector data was found. CSS selector stats need to be enabled in the per
976
1003
  ## Estimated savings: none
977
1004
 
978
1005
  ## External resources:
1006
+ - https://developer.chrome.com/docs/performance/insights/slow-css-selector
979
1007
  - https://developer.chrome.com/docs/devtools/performance/selector-stats
980
1008
  === end content
981
1009
 
@@ -997,11 +1025,12 @@ Elapsed time: 0 ms
997
1025
  Match attempts: 2444
998
1026
  Match count: 465
999
1027
 
1000
- If Recalculate Style costs remain high, selector optimization can reduce them. [Optimize the selectors](https://developer.chrome.com/docs/devtools/performance/selector-stats) with both high elapsed time and high slow-path %. Simpler selectors, fewer selectors, a smaller DOM, and a shallower DOM will all reduce matching costs.
1028
+ If Recalculate Style costs remain high, selector optimization can reduce them. [Optimize the selectors](https://developer.chrome.com/docs/performance/insights/slow-css-selector) with both high elapsed time and high slow-path %. Simpler selectors, fewer selectors, a smaller DOM, and a shallower DOM will all reduce matching costs.
1001
1029
 
1002
1030
  ## Estimated savings: none
1003
1031
 
1004
1032
  ## External resources:
1033
+ - https://developer.chrome.com/docs/performance/insights/slow-css-selector
1005
1034
  - https://developer.chrome.com/docs/devtools/performance/selector-stats
1006
1035
  === end content
1007
1036
 
@@ -1018,6 +1047,7 @@ No 3rd party scripts were found on this page.
1018
1047
  ## Estimated savings: none
1019
1048
 
1020
1049
  ## External resources:
1050
+ - https://developer.chrome.com/docs/performance/insights/third-parties
1021
1051
  - https://web.dev/articles/optimizing-content-efficiency-loading-third-party-javascript/
1022
1052
  === end content
1023
1053
 
@@ -1043,11 +1073,12 @@ The following list contains the largest amount spent by a 3rd party script on th
1043
1073
  - noondiphcddnnabmjcihcjfbhfklnnep: 2 ms
1044
1074
  - web.app: 0.2 ms
1045
1075
 
1046
- 3rd party code can significantly impact load performance. [Reduce and defer loading of 3rd party code](https://web.dev/articles/optimizing-content-efficiency-loading-third-party-javascript/) to prioritize your page's content.
1076
+ 3rd party code can significantly impact load performance. [Reduce and defer loading of 3rd party code](https://developer.chrome.com/docs/performance/insights/third-parties) to prioritize your page's content.
1047
1077
 
1048
1078
  ## Estimated savings: none
1049
1079
 
1050
1080
  ## External resources:
1081
+ - https://developer.chrome.com/docs/performance/insights/third-parties
1051
1082
  - https://web.dev/articles/optimizing-content-efficiency-loading-third-party-javascript/
1052
1083
  === end content
1053
1084
 
@@ -1064,6 +1095,7 @@ No requests with inefficient cache policies.
1064
1095
  ## Estimated savings: none
1065
1096
 
1066
1097
  ## External resources:
1098
+ - https://developer.chrome.com/docs/performance/insights/cache
1067
1099
  - https://web.dev/uses-long-cache-ttl/
1068
1100
  === end content
1069
1101
 
@@ -1081,11 +1113,12 @@ The following resources were associated with ineffficient cache policies:
1081
1113
  - Cache Time to Live (TTL): 600 seconds
1082
1114
  - Wasted bytes: 0 B
1083
1115
 
1084
- A long cache lifetime can speed up repeat visits to your page. [Learn more](https://web.dev/uses-long-cache-ttl/).
1116
+ A long cache lifetime can speed up repeat visits to your page. [Learn more about caching](https://developer.chrome.com/docs/performance/insights/cache).
1085
1117
 
1086
1118
  ## Estimated savings: none
1087
1119
 
1088
1120
  ## External resources:
1121
+ - https://developer.chrome.com/docs/performance/insights/cache
1089
1122
  - https://web.dev/uses-long-cache-ttl/
1090
1123
  === end content
1091
1124
 
@@ -1104,6 +1137,7 @@ The viewport meta tag was found: `width=device-width, initial-scale=0.25`.
1104
1137
  ## Estimated savings: INP 0 ms
1105
1138
 
1106
1139
  ## External resources:
1140
+ - https://developer.chrome.com/docs/performance/insights/viewport
1107
1141
  - https://developer.chrome.com/blog/300ms-tap-delay-gone-away/
1108
1142
  === end content
1109
1143
 
@@ -1119,10 +1153,11 @@ The webpage is not optimized for mobile viewing.
1119
1153
 
1120
1154
  The viewport meta tag is missing.
1121
1155
 
1122
- Tap interactions may be [delayed by up to 300 ms](https://developer.chrome.com/blog/300ms-tap-delay-gone-away/) if the viewport is not optimized for mobile.
1156
+ Tap interactions may be [delayed by up to 300 ms](https://developer.chrome.com/docs/performance/insights/viewport) if the viewport is not optimized for mobile.
1123
1157
 
1124
1158
  ## Estimated savings: none
1125
1159
 
1126
1160
  ## External resources:
1161
+ - https://developer.chrome.com/docs/performance/insights/viewport
1127
1162
  - https://developer.chrome.com/blog/300ms-tap-delay-gone-away/
1128
1163
  === end content
@@ -1009,55 +1009,73 @@ ${this.#links()}`;
1009
1009
  }
1010
1010
 
1011
1011
  #links(): string {
1012
+ const links = [];
1013
+
1014
+ if (this.#insight.docs) {
1015
+ links.push(this.#insight.docs);
1016
+ }
1017
+
1012
1018
  switch (this.#insight.insightKey) {
1013
1019
  case 'CLSCulprits':
1014
- return `- https://web.dev/articles/cls
1015
- - https://web.dev/articles/optimize-cls`;
1020
+ links.push('https://web.dev/articles/cls');
1021
+ links.push('https://web.dev/articles/optimize-cls');
1022
+ break;
1016
1023
  case 'DocumentLatency':
1017
- return '- https://web.dev/articles/optimize-ttfb';
1024
+ links.push('https://web.dev/articles/optimize-ttfb');
1025
+ break;
1018
1026
  case 'DOMSize':
1019
- return '- https://developer.chrome.com/docs/lighthouse/performance/dom-size/';
1020
- case 'DuplicatedJavaScript':
1021
- return '';
1027
+ links.push('https://developer.chrome.com/docs/lighthouse/performance/dom-size/');
1028
+ break;
1022
1029
  case 'FontDisplay':
1023
- return `- https://web.dev/articles/preload-optional-fonts
1024
- - https://fonts.google.com/knowledge/glossary/foit
1025
- - https://developer.chrome.com/blog/font-fallbacks`;
1030
+ links.push('https://web.dev/articles/preload-optional-fonts');
1031
+ links.push('https://fonts.google.com/knowledge/glossary/foit');
1032
+ links.push('https://developer.chrome.com/blog/font-fallbacks');
1033
+ break;
1026
1034
  case 'ForcedReflow':
1027
- return '- https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing#avoid-forced-synchronous-layouts';
1035
+ links.push(
1036
+ 'https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing#avoid-forced-synchronous-layouts');
1037
+ break;
1028
1038
  case 'ImageDelivery':
1029
- return '- https://developer.chrome.com/docs/lighthouse/performance/uses-optimized-images/';
1039
+ links.push('https://developer.chrome.com/docs/lighthouse/performance/uses-optimized-images/');
1040
+ break;
1030
1041
  case 'INPBreakdown':
1031
- return `- https://web.dev/articles/inp
1032
- - https://web.dev/explore/how-to-optimize-inp
1033
- - https://web.dev/articles/optimize-long-tasks
1034
- - https://web.dev/articles/avoid-large-complex-layouts-and-layout-thrashing`;
1035
- case 'LCPDiscovery':
1036
- return `- https://web.dev/articles/lcp
1037
- - https://web.dev/articles/optimize-lcp`;
1042
+ links.push('https://web.dev/articles/inp');
1043
+ links.push('https://web.dev/explore/how-to-optimize-inp');
1044
+ links.push('https://web.dev/articles/optimize-long-tasks');
1045
+ links.push('https://web.dev/articles/avoid-large-complex-layouts-and-layout-thrashing');
1046
+ break;
1038
1047
  case 'LCPBreakdown':
1039
- return `- https://web.dev/articles/lcp
1040
- - https://web.dev/articles/optimize-lcp`;
1041
- case 'NetworkDependencyTree':
1042
- return `- https://web.dev/learn/performance/understanding-the-critical-path
1043
- - https://developer.chrome.com/docs/lighthouse/performance/uses-rel-preconnect/`;
1048
+ case 'LCPDiscovery':
1044
1049
  case 'RenderBlocking':
1045
- return `- https://web.dev/articles/lcp
1046
- - https://web.dev/articles/optimize-lcp`;
1050
+ links.push('https://web.dev/articles/lcp');
1051
+ links.push('https://web.dev/articles/optimize-lcp');
1052
+ break;
1053
+ case 'NetworkDependencyTree':
1054
+ links.push('https://web.dev/learn/performance/understanding-the-critical-path');
1055
+ links.push('https://developer.chrome.com/docs/lighthouse/performance/uses-rel-preconnect/');
1056
+ break;
1047
1057
  case 'SlowCSSSelector':
1048
- return '- https://developer.chrome.com/docs/devtools/performance/selector-stats';
1058
+ links.push('https://developer.chrome.com/docs/devtools/performance/selector-stats');
1059
+ break;
1049
1060
  case 'ThirdParties':
1050
- return '- https://web.dev/articles/optimizing-content-efficiency-loading-third-party-javascript/';
1061
+ links.push('https://web.dev/articles/optimizing-content-efficiency-loading-third-party-javascript/');
1062
+ break;
1051
1063
  case 'Viewport':
1052
- return '- https://developer.chrome.com/blog/300ms-tap-delay-gone-away/';
1064
+ links.push('https://developer.chrome.com/blog/300ms-tap-delay-gone-away/');
1065
+ break;
1053
1066
  case 'Cache':
1054
- return '- https://web.dev/uses-long-cache-ttl/';
1067
+ links.push('https://web.dev/uses-long-cache-ttl/');
1068
+ break;
1055
1069
  case 'ModernHTTP':
1056
- return '- https://developer.chrome.com/docs/lighthouse/best-practices/uses-http2';
1070
+ links.push('https://developer.chrome.com/docs/lighthouse/best-practices/uses-http2');
1071
+ break;
1057
1072
  case 'LegacyJavaScript':
1058
- return `- https://web.dev/articles/baseline-and-polyfills
1059
- - https://philipwalton.com/articles/the-state-of-es5-on-the-web/`;
1073
+ links.push('https://web.dev/articles/baseline-and-polyfills');
1074
+ links.push('https://philipwalton.com/articles/the-state-of-es5-on-the-web/');
1075
+ break;
1060
1076
  }
1077
+
1078
+ return links.map(link => '- ' + link).join('\n');
1061
1079
  }
1062
1080
 
1063
1081
  #description(): string {