chrome-devtools-frontend 1.0.965113 → 1.0.967135
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/gni/devtools_grd_files.gni +5 -5
- package/front_end/core/common/ResolverBase.ts +2 -2
- package/front_end/core/i18n/locales/af.json +55 -22
- package/front_end/core/i18n/locales/am.json +55 -22
- package/front_end/core/i18n/locales/ar.json +55 -22
- package/front_end/core/i18n/locales/as.json +55 -22
- package/front_end/core/i18n/locales/az.json +55 -22
- package/front_end/core/i18n/locales/be.json +55 -22
- package/front_end/core/i18n/locales/bg.json +55 -22
- package/front_end/core/i18n/locales/bn.json +33 -0
- package/front_end/core/i18n/locales/bs.json +53 -20
- package/front_end/core/i18n/locales/ca.json +55 -22
- package/front_end/core/i18n/locales/cs.json +54 -21
- package/front_end/core/i18n/locales/cy.json +55 -22
- package/front_end/core/i18n/locales/da.json +54 -21
- package/front_end/core/i18n/locales/de.json +55 -22
- package/front_end/core/i18n/locales/el.json +55 -22
- package/front_end/core/i18n/locales/en-GB.json +33 -0
- package/front_end/core/i18n/locales/es-419.json +55 -22
- package/front_end/core/i18n/locales/es.json +55 -22
- package/front_end/core/i18n/locales/et.json +55 -22
- package/front_end/core/i18n/locales/eu.json +33 -0
- package/front_end/core/i18n/locales/fa.json +56 -23
- package/front_end/core/i18n/locales/fi.json +55 -22
- package/front_end/core/i18n/locales/fil.json +55 -22
- package/front_end/core/i18n/locales/fr-CA.json +55 -22
- package/front_end/core/i18n/locales/fr.json +55 -22
- package/front_end/core/i18n/locales/gl.json +55 -22
- package/front_end/core/i18n/locales/gu.json +33 -0
- package/front_end/core/i18n/locales/he.json +55 -22
- package/front_end/core/i18n/locales/hi.json +33 -0
- package/front_end/core/i18n/locales/hr.json +33 -0
- package/front_end/core/i18n/locales/hu.json +55 -22
- package/front_end/core/i18n/locales/hy.json +55 -22
- package/front_end/core/i18n/locales/id.json +55 -22
- package/front_end/core/i18n/locales/is.json +55 -22
- package/front_end/core/i18n/locales/it.json +55 -22
- package/front_end/core/i18n/locales/ja.json +63 -30
- package/front_end/core/i18n/locales/ka.json +55 -22
- package/front_end/core/i18n/locales/kk.json +55 -22
- package/front_end/core/i18n/locales/km.json +55 -22
- package/front_end/core/i18n/locales/kn.json +55 -22
- package/front_end/core/i18n/locales/ko.json +55 -22
- package/front_end/core/i18n/locales/ky.json +55 -22
- package/front_end/core/i18n/locales/lo.json +55 -22
- package/front_end/core/i18n/locales/lt.json +55 -22
- package/front_end/core/i18n/locales/lv.json +55 -22
- package/front_end/core/i18n/locales/mk.json +55 -22
- package/front_end/core/i18n/locales/ml.json +33 -0
- package/front_end/core/i18n/locales/mn.json +33 -0
- package/front_end/core/i18n/locales/mr.json +54 -21
- package/front_end/core/i18n/locales/ms.json +55 -22
- package/front_end/core/i18n/locales/my.json +55 -22
- package/front_end/core/i18n/locales/ne.json +54 -21
- package/front_end/core/i18n/locales/nl.json +55 -22
- package/front_end/core/i18n/locales/no.json +55 -22
- package/front_end/core/i18n/locales/or.json +55 -22
- package/front_end/core/i18n/locales/pa.json +55 -22
- package/front_end/core/i18n/locales/pl.json +33 -0
- package/front_end/core/i18n/locales/pt-PT.json +55 -22
- package/front_end/core/i18n/locales/pt.json +55 -22
- package/front_end/core/i18n/locales/ro.json +33 -0
- package/front_end/core/i18n/locales/ru.json +55 -22
- package/front_end/core/i18n/locales/si.json +55 -22
- package/front_end/core/i18n/locales/sk.json +55 -22
- package/front_end/core/i18n/locales/sl.json +55 -22
- package/front_end/core/i18n/locales/sq.json +55 -22
- package/front_end/core/i18n/locales/sr-Latn.json +55 -22
- package/front_end/core/i18n/locales/sr.json +55 -22
- package/front_end/core/i18n/locales/sv.json +55 -22
- package/front_end/core/i18n/locales/sw.json +55 -22
- package/front_end/core/i18n/locales/ta.json +55 -22
- package/front_end/core/i18n/locales/te.json +42 -9
- package/front_end/core/i18n/locales/th.json +33 -0
- package/front_end/core/i18n/locales/tr.json +55 -22
- package/front_end/core/i18n/locales/uk.json +55 -22
- package/front_end/core/i18n/locales/ur.json +55 -22
- package/front_end/core/i18n/locales/uz.json +55 -22
- package/front_end/core/i18n/locales/vi.json +54 -21
- package/front_end/core/i18n/locales/zh-HK.json +55 -22
- package/front_end/core/i18n/locales/zh-TW.json +54 -21
- package/front_end/core/i18n/locales/zh.json +55 -22
- package/front_end/core/i18n/locales/zu.json +55 -22
- package/front_end/core/protocol_client/InspectorBackend.ts +8 -0
- package/front_end/core/sdk/CSSProperty.ts +8 -8
- package/front_end/core/sdk/NetworkManager.ts +58 -70
- package/front_end/core/sdk/RemoteObject.ts +1 -1
- package/front_end/core/sdk/Resource.ts +5 -2
- package/front_end/core/sdk/RuntimeModel.ts +10 -0
- package/front_end/devtools_compatibility.js +19 -0
- package/front_end/entrypoints/formatter_worker/formatter_worker.ts +4 -4
- package/front_end/generated/InspectorBackendCommands.js +27 -2
- package/front_end/generated/protocol.ts +61 -0
- package/front_end/legacy_test_runner/bindings_test_runner/PersistenceTestRunner.js +2 -2
- package/front_end/legacy_test_runner/console_test_runner/console_test_runner.js +10 -3
- package/front_end/legacy_test_runner/heap_profiler_test_runner/heap_profiler_test_runner.js +1 -2
- package/front_end/legacy_test_runner/sources_test_runner/DebuggerTestRunner.js +5 -5
- package/front_end/models/bindings/ContentProviderBasedProject.ts +2 -3
- package/front_end/models/extensions/ExtensionServer.ts +7 -1
- package/front_end/models/javascript_metadata/NativeFunctions.js +18 -21
- package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +1 -1
- package/front_end/models/persistence/IsolatedFileSystem.ts +2 -2
- package/front_end/models/persistence/NetworkPersistenceManager.ts +7 -4
- package/front_end/models/workspace/WorkspaceImpl.ts +62 -37
- package/front_end/panels/console/ConsoleViewMessage.ts +33 -6
- package/front_end/panels/console/ErrorStackParser.ts +34 -0
- package/front_end/panels/elements/StylePropertyTreeElement.ts +14 -2
- package/front_end/panels/elements/StylesSidebarPane.ts +0 -3
- package/front_end/panels/emulation/DeviceModeView.ts +6 -2
- package/front_end/panels/event_listeners/EventListenersUtils.ts +3 -2
- package/front_end/panels/event_listeners/EventListenersView.ts +3 -3
- package/front_end/panels/lighthouse/lighthouse.ts +1 -1
- package/front_end/panels/sources/DebuggerPausedMessage.ts +2 -2
- package/front_end/panels/sources/SourcesPanel.ts +7 -10
- package/front_end/panels/sources/UISourceCodeFrame.ts +4 -4
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +1 -2
- package/front_end/panels/sources/debuggerPausedMessage.css +5 -1
- package/front_end/third_party/codemirror/README.chromium +5 -0
- package/front_end/third_party/codemirror/codemirror-tsconfig.json +4 -4
- package/front_end/third_party/codemirror/package/addon/runmode/{runmode-standalone.js → runmode-standalone.mjs} +0 -0
- package/front_end/third_party/codemirror/package/addon/runmode/{runmode-standalone.d.ts → runmode-standalone.mjs.d.ts} +0 -0
- package/front_end/third_party/codemirror/package/mode/css/{css.js → css.mjs} +0 -0
- package/front_end/third_party/codemirror/package/mode/css/{css.d.ts → css.mjs.d.ts} +0 -0
- package/front_end/third_party/codemirror/package/mode/javascript/{javascript.js → javascript.mjs} +0 -0
- package/front_end/third_party/codemirror/package/mode/javascript/{javascript.d.ts → javascript.mjs.d.ts} +0 -0
- package/front_end/third_party/codemirror/package/mode/xml/{xml.js → xml.mjs} +0 -0
- package/front_end/third_party/codemirror/package/mode/xml/{xml.d.ts → xml.mjs.d.ts} +0 -0
- package/front_end/third_party/lighthouse/README.chromium +0 -1
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +954 -885
- package/front_end/third_party/lighthouse/lighthouse-tsconfig.json +1 -1
- package/front_end/third_party/lighthouse/locales/ar-XB.json +40 -4
- package/front_end/third_party/lighthouse/locales/ar.json +59 -23
- package/front_end/third_party/lighthouse/locales/bg.json +40 -4
- package/front_end/third_party/lighthouse/locales/ca.json +45 -9
- package/front_end/third_party/lighthouse/locales/cs.json +39 -3
- package/front_end/third_party/lighthouse/locales/da.json +43 -7
- package/front_end/third_party/lighthouse/locales/de.json +42 -6
- package/front_end/third_party/lighthouse/locales/el.json +59 -23
- package/front_end/third_party/lighthouse/locales/en-GB.json +43 -7
- package/front_end/third_party/lighthouse/locales/en-US.json +48 -6
- package/front_end/third_party/lighthouse/locales/en-XA.json +40 -4
- package/front_end/third_party/lighthouse/locales/en-XL.json +48 -6
- package/front_end/third_party/lighthouse/locales/es-419.json +39 -3
- package/front_end/third_party/lighthouse/locales/es.json +46 -10
- package/front_end/third_party/lighthouse/locales/fi.json +57 -21
- package/front_end/third_party/lighthouse/locales/fil.json +40 -4
- package/front_end/third_party/lighthouse/locales/fr.json +45 -9
- package/front_end/third_party/lighthouse/locales/he.json +41 -5
- package/front_end/third_party/lighthouse/locales/hi.json +59 -23
- package/front_end/third_party/lighthouse/locales/hr.json +57 -21
- package/front_end/third_party/lighthouse/locales/hu.json +39 -3
- package/front_end/third_party/lighthouse/locales/id.json +40 -4
- package/front_end/third_party/lighthouse/locales/it.json +40 -4
- package/front_end/third_party/lighthouse/locales/ja.json +39 -3
- package/front_end/third_party/lighthouse/locales/ko.json +40 -4
- package/front_end/third_party/lighthouse/locales/lt.json +40 -4
- package/front_end/third_party/lighthouse/locales/lv.json +56 -20
- package/front_end/third_party/lighthouse/locales/nl.json +40 -4
- package/front_end/third_party/lighthouse/locales/no.json +56 -20
- package/front_end/third_party/lighthouse/locales/pl.json +56 -20
- package/front_end/third_party/lighthouse/locales/pt-PT.json +57 -21
- package/front_end/third_party/lighthouse/locales/pt.json +41 -5
- package/front_end/third_party/lighthouse/locales/ro.json +39 -3
- package/front_end/third_party/lighthouse/locales/ru.json +40 -4
- package/front_end/third_party/lighthouse/locales/sk.json +39 -3
- package/front_end/third_party/lighthouse/locales/sl.json +39 -3
- package/front_end/third_party/lighthouse/locales/sr-Latn.json +40 -4
- package/front_end/third_party/lighthouse/locales/sr.json +40 -4
- package/front_end/third_party/lighthouse/locales/sv.json +39 -3
- package/front_end/third_party/lighthouse/locales/ta.json +47 -11
- package/front_end/third_party/lighthouse/locales/te.json +61 -25
- package/front_end/third_party/lighthouse/locales/th.json +39 -3
- package/front_end/third_party/lighthouse/locales/tr.json +40 -4
- package/front_end/third_party/lighthouse/locales/uk.json +40 -4
- package/front_end/third_party/lighthouse/locales/vi.json +63 -27
- package/front_end/third_party/lighthouse/locales/zh-HK.json +40 -4
- package/front_end/third_party/lighthouse/locales/zh-TW.json +45 -9
- package/front_end/third_party/lighthouse/locales/zh.json +41 -5
- package/front_end/third_party/lighthouse/report/bundle.d.ts +1 -0
- package/front_end/third_party/lighthouse/report/bundle.js +23 -11
- package/front_end/third_party/lighthouse/report-assets/{report-generator.js → report-generator.mjs} +1 -1
- package/front_end/third_party/lighthouse/report-assets/{report-generator.d.ts → report-generator.mjs.d.ts} +0 -0
- package/front_end/third_party/puppeteer/puppeteer.ts +1 -2
- package/front_end/ui/components/docs/tree_outline/custom-renderers.ts +3 -3
- package/front_end/ui/legacy/Icon.ts +2 -2
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +4 -4
- package/front_end/ui/legacy/components/perf_ui/LiveHeapProfile.ts +2 -2
- package/front_end/ui/legacy/themeColors.css +1 -1
- package/package.json +1 -1
- package/scripts/build/devtools_plugin.js +11 -0
- package/scripts/build/esbuild.js +63 -0
- package/scripts/build/ninja/bundle.gni +77 -32
- package/scripts/build/ninja/minify-json-files.js +19 -0
- package/scripts/build/ninja/minify_json.gni +28 -0
- package/scripts/javascript_natives/index.js +9 -6
- package/scripts/javascript_natives/package.json +4 -4
@@ -417,10 +417,10 @@
|
|
417
417
|
"message": "将图片用作 `<input>` 按钮时,提供替代文字有助于屏幕阅读器用户了解该按钮的用途。[了解详情](https://web.dev/input-image-alt/)。"
|
418
418
|
},
|
419
419
|
"lighthouse-core/audits/accessibility/input-image-alt.js | failureTitle": {
|
420
|
-
"message": "`<input type=\"image\">`
|
420
|
+
"message": "`<input type=\"image\">` 元素无对应的 `[alt]` 文字"
|
421
421
|
},
|
422
422
|
"lighthouse-core/audits/accessibility/input-image-alt.js | title": {
|
423
|
-
"message": "`<input type=\"image\">`
|
423
|
+
"message": "`<input type=\"image\">` 元素有对应的 `[alt]` 文字"
|
424
424
|
},
|
425
425
|
"lighthouse-core/audits/accessibility/label.js | description": {
|
426
426
|
"message": "标签可确保辅助技术(如屏幕阅读器)正确读出表单控件。[了解详情](https://web.dev/label/)。"
|
@@ -480,10 +480,10 @@
|
|
480
480
|
"message": "屏幕阅读器无法转换非文字内容。向 `<object>` 元素添加替代文字可帮助屏幕阅读器将含义传达给用户。[了解详情](https://web.dev/object-alt/)。"
|
481
481
|
},
|
482
482
|
"lighthouse-core/audits/accessibility/object-alt.js | failureTitle": {
|
483
|
-
"message": "`<object>`
|
483
|
+
"message": "`<object>` 元素无对应的替代文字"
|
484
484
|
},
|
485
485
|
"lighthouse-core/audits/accessibility/object-alt.js | title": {
|
486
|
-
"message": "`<object>`
|
486
|
+
"message": "`<object>` 元素有对应的替代文字"
|
487
487
|
},
|
488
488
|
"lighthouse-core/audits/accessibility/tabindex.js | description": {
|
489
489
|
"message": "值大于 0 意味着明确的导航顺序。尽管这在技术上可行,但往往会让依赖辅助技术的用户感到沮丧。[了解详情](https://web.dev/tabindex/)。"
|
@@ -1052,6 +1052,9 @@
|
|
1052
1052
|
"lighthouse-core/audits/installable-manifest.js | not-offline-capable": {
|
1053
1053
|
"message": "该网页无法离线使用"
|
1054
1054
|
},
|
1055
|
+
"lighthouse-core/audits/installable-manifest.js | pipeline-restarted": {
|
1056
|
+
"message": "PWA 已卸载完毕,正在重置可安装性检查。"
|
1057
|
+
},
|
1055
1058
|
"lighthouse-core/audits/installable-manifest.js | platform-not-supported-on-android": {
|
1056
1059
|
"message": "指定的应用平台在 Android 设备上不受支持"
|
1057
1060
|
},
|
@@ -1061,6 +1064,9 @@
|
|
1061
1064
|
"lighthouse-core/audits/installable-manifest.js | prefer-related-applications-only-beta-stable": {
|
1062
1065
|
"message": "prefer_related_applications 仅适用于 Android 设备上的 Chrome Beta 版和稳定版。"
|
1063
1066
|
},
|
1067
|
+
"lighthouse-core/audits/installable-manifest.js | protocol-timeout": {
|
1068
|
+
"message": "Lighthouse 无法确定是否有 Service Worker。请在更新版本的 Chrome 中重试。"
|
1069
|
+
},
|
1064
1070
|
"lighthouse-core/audits/installable-manifest.js | start-url-not-valid": {
|
1065
1071
|
"message": "清单起始网址无效"
|
1066
1072
|
},
|
@@ -1212,7 +1218,7 @@
|
|
1212
1218
|
"message": "服务器后端延迟"
|
1213
1219
|
},
|
1214
1220
|
"lighthouse-core/audits/no-unload-listeners.js | description": {
|
1215
|
-
"message": "“`unload
|
1221
|
+
"message": "“`unload`”事件不会可靠地触发,而且监听该事件可能会妨碍系统实施“往返缓存”之类的浏览器优化策略。请改用“`pagehide`”或“`visibilitychange`”事件。[了解详情](https://web.dev/bfcache/#never-use-the-unload-event)"
|
1216
1222
|
},
|
1217
1223
|
"lighthouse-core/audits/no-unload-listeners.js | failureTitle": {
|
1218
1224
|
"message": "注册“`unload`”事件监听器"
|
@@ -2219,6 +2225,36 @@
|
|
2219
2225
|
"node_modules/lighthouse-stack-packs/packs/magento.js | uses-rel-preload": {
|
2220
2226
|
"message": "您可以通过[修改主题背景的布局](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-manage.html)来添加 `<link rel=preload>` 标记。"
|
2221
2227
|
},
|
2228
|
+
"node_modules/lighthouse-stack-packs/packs/next.js | modern-image-formats": {
|
2229
|
+
"message": "请使用 `Next.js` Image Optimization API 提供现代格式,例如 `WebP` 和 `AVIF`。[了解详情](https://nextjs.org/docs/api-reference/next/image#acceptable-formats)。"
|
2230
|
+
},
|
2231
|
+
"node_modules/lighthouse-stack-packs/packs/next.js | offscreen-images": {
|
2232
|
+
"message": "请使用 `next/image` 组件,该组件的默认设置是 `loading=\"lazy\"`。[了解详情](https://nextjs.org/docs/api-reference/next/image#loading)。"
|
2233
|
+
},
|
2234
|
+
"node_modules/lighthouse-stack-packs/packs/next.js | render-blocking-resources": {
|
2235
|
+
"message": "请使用 `next/script` 组件推迟加载非关键第三方脚本。[了解详情](https://nextjs.org/docs/basic-features/script)。"
|
2236
|
+
},
|
2237
|
+
"node_modules/lighthouse-stack-packs/packs/next.js | unused-css-rules": {
|
2238
|
+
"message": "建议您在 `Next.js` 配置中设置 `PurgeCSS` 以从样式表中移除未使用的规则。[了解详情](https://purgecss.com/guides/next.html)。"
|
2239
|
+
},
|
2240
|
+
"node_modules/lighthouse-stack-packs/packs/next.js | unused-javascript": {
|
2241
|
+
"message": "请使用 `Webpack Bundle Analyzer` 检测未使用的 JavaScript 代码。[了解详情](https://github.com/vercel/next.js/tree/canary/packages/next-bundle-analyzer)。"
|
2242
|
+
},
|
2243
|
+
"node_modules/lighthouse-stack-packs/packs/next.js | user-timings": {
|
2244
|
+
"message": "建议您使用 `Next.js Analytics` 衡量应用的实际性能。[了解详情](https://nextjs.org/docs/advanced-features/measuring-performance)。"
|
2245
|
+
},
|
2246
|
+
"node_modules/lighthouse-stack-packs/packs/next.js | uses-long-cache-ttl": {
|
2247
|
+
"message": "请为不可变资源和`Server-side Rendered` (SSR) 网页配置缓存。[了解详情](https://nextjs.org/docs/going-to-production#caching)。"
|
2248
|
+
},
|
2249
|
+
"node_modules/lighthouse-stack-packs/packs/next.js | uses-optimized-images": {
|
2250
|
+
"message": "请使用 `next/image` 组件(而非 `<img>`)优化图片。[了解详情](https://nextjs.org/docs/basic-features/image-optimization)。"
|
2251
|
+
},
|
2252
|
+
"node_modules/lighthouse-stack-packs/packs/next.js | uses-responsive-images": {
|
2253
|
+
"message": "请使用 `next/image` 组件设置适当的 `sizes`。[了解详情](https://nextjs.org/docs/api-reference/next/image#sizes)。"
|
2254
|
+
},
|
2255
|
+
"node_modules/lighthouse-stack-packs/packs/next.js | uses-text-compression": {
|
2256
|
+
"message": "请在您的 Next.js 服务器上启用压缩功能。[了解详情](https://nextjs.org/docs/api-reference/next.config.js/compression)。"
|
2257
|
+
},
|
2222
2258
|
"node_modules/lighthouse-stack-packs/packs/octobercms.js | efficient-animated-content": {
|
2223
2259
|
"message": "[将 GIF 动画替换为视频](https://web.dev/replace-gifs-with-videos/)以提高网页加载速度,并考虑使用现代文件格式(例如 [WebM](https://web.dev/replace-gifs-with-videos/#create-webm-videos) 或 [AV1](https://developers.google.com/web/updates/2018/09/chrome-70-media-updates#av1-decoder)),通过目前最先进的 VP9 视频编解码器将压缩效率提高 30% 以上。"
|
2224
2260
|
},
|
@@ -1398,7 +1398,7 @@ function createTopbarComponent(dom) {
|
|
1398
1398
|
el40.setAttribute('href', '#');
|
1399
1399
|
el40.setAttribute('data-i18n', 'dropdownCopyJSON');
|
1400
1400
|
el40.setAttribute('data-action', 'copy');
|
1401
|
-
const el41 = dom.createElement('a', 'lh-report-icon lh-report-icon--download');
|
1401
|
+
const el41 = dom.createElement('a', 'lh-report-icon lh-report-icon--download lh-hidden');
|
1402
1402
|
el41.setAttribute('role', 'menuitem');
|
1403
1403
|
el41.setAttribute('tabindex', '-1');
|
1404
1404
|
el41.setAttribute('href', '#');
|
@@ -1428,7 +1428,7 @@ function createTopbarComponent(dom) {
|
|
1428
1428
|
el45.setAttribute('href', '#');
|
1429
1429
|
el45.setAttribute('data-i18n', 'dropdownDarkTheme');
|
1430
1430
|
el45.setAttribute('data-action', 'toggle-dark');
|
1431
|
-
el37.append(' ', el38, ' ', el39, ' ', el40, ' ', el41, ' ', el42, ' ', el43, ' ', el44, ' ', el45, ' ');
|
1431
|
+
el37.append(' ', el38, ' ', el39, ' ', el40, ' ', ' ', el41, ' ', el42, ' ', el43, ' ', el44, ' ', el45, ' ');
|
1432
1432
|
el26.append(' ', el27, ' ', el33, ' ', el37, ' ');
|
1433
1433
|
el2.append(' ', ' ', el3, ' ', el25, ' ', el26, ' ');
|
1434
1434
|
el0.append(el2);
|
@@ -2260,7 +2260,7 @@ class CategoryRenderer {
|
|
2260
2260
|
* @return {boolean}
|
2261
2261
|
*/
|
2262
2262
|
_auditHasWarning(audit) {
|
2263
|
-
return Boolean(audit.result.warnings
|
2263
|
+
return Boolean(audit.result.warnings?.length);
|
2264
2264
|
}
|
2265
2265
|
|
2266
2266
|
/**
|
@@ -4176,8 +4176,8 @@ class PerformanceCategoryRenderer extends CategoryRenderer {
|
|
4176
4176
|
// Filmstrip
|
4177
4177
|
const timelineEl = this.dom.createChildOf(element, 'div', 'lh-filmstrip-container');
|
4178
4178
|
const thumbnailAudit = category.auditRefs.find(audit => audit.id === 'screenshot-thumbnails');
|
4179
|
-
const thumbnailResult = thumbnailAudit
|
4180
|
-
if (thumbnailResult
|
4179
|
+
const thumbnailResult = thumbnailAudit?.result;
|
4180
|
+
if (thumbnailResult?.details) {
|
4181
4181
|
timelineEl.id = thumbnailResult.id;
|
4182
4182
|
const filmstripEl = this.detailsRenderer.render(thumbnailResult.details);
|
4183
4183
|
filmstripEl && timelineEl.appendChild(filmstripEl);
|
@@ -4252,7 +4252,7 @@ class PerformanceCategoryRenderer extends CategoryRenderer {
|
|
4252
4252
|
const budgetTableEls = [];
|
4253
4253
|
['performance-budget', 'timing-budget'].forEach((id) => {
|
4254
4254
|
const audit = category.auditRefs.find(audit => audit.id === id);
|
4255
|
-
if (audit
|
4255
|
+
if (audit?.result.details) {
|
4256
4256
|
const table = this.detailsRenderer.render(audit.result.details);
|
4257
4257
|
if (table) {
|
4258
4258
|
table.id = id;
|
@@ -4298,7 +4298,7 @@ class PerformanceCategoryRenderer extends CategoryRenderer {
|
|
4298
4298
|
|
4299
4299
|
const labelEl = this.dom.createChildOf(metricFilterEl, 'label', 'lh-metricfilter__label');
|
4300
4300
|
labelEl.htmlFor = elemId;
|
4301
|
-
labelEl.title = metric.result
|
4301
|
+
labelEl.title = metric.result?.title;
|
4302
4302
|
labelEl.textContent = metric.acronym || metric.id;
|
4303
4303
|
|
4304
4304
|
if (metric.acronym === 'All') {
|
@@ -4773,7 +4773,7 @@ class ReportRenderer {
|
|
4773
4773
|
Util.reportJson = report;
|
4774
4774
|
|
4775
4775
|
const fullPageScreenshot =
|
4776
|
-
report.audits['full-page-screenshot']
|
4776
|
+
report.audits['full-page-screenshot']?.details &&
|
4777
4777
|
report.audits['full-page-screenshot'].details.type === 'full-page-screenshot' ?
|
4778
4778
|
report.audits['full-page-screenshot'].details : undefined;
|
4779
4779
|
const detailsRenderer = new DetailsRenderer(this._dom, {
|
@@ -5767,6 +5767,10 @@ class ReportUIFeatures {
|
|
5767
5767
|
});
|
5768
5768
|
}
|
5769
5769
|
|
5770
|
+
if (this._opts.getStandaloneReportHTML) {
|
5771
|
+
this._dom.find('a[data-action="save-html"]', this._dom.rootEl).classList.remove('lh-hidden');
|
5772
|
+
}
|
5773
|
+
|
5770
5774
|
// Fill in all i18n data.
|
5771
5775
|
for (const node of this._dom.findAll('[data-i18n]', this._dom.rootEl)) {
|
5772
5776
|
// These strings are guaranteed to (at least) have a default English string in Util.UIStrings,
|
@@ -5801,15 +5805,23 @@ class ReportUIFeatures {
|
|
5801
5805
|
return buttonEl;
|
5802
5806
|
}
|
5803
5807
|
|
5808
|
+
resetUIState() {
|
5809
|
+
if (this._topbar) {
|
5810
|
+
this._topbar.resetUIState();
|
5811
|
+
}
|
5812
|
+
}
|
5813
|
+
|
5804
5814
|
/**
|
5805
5815
|
* Returns the html that recreates this report.
|
5806
5816
|
* @return {string}
|
5807
5817
|
*/
|
5808
5818
|
getReportHtml() {
|
5809
|
-
if (this.
|
5810
|
-
|
5819
|
+
if (!this._opts.getStandaloneReportHTML) {
|
5820
|
+
throw new Error('`getStandaloneReportHTML` is not set');
|
5811
5821
|
}
|
5812
|
-
|
5822
|
+
|
5823
|
+
this.resetUIState();
|
5824
|
+
return this._opts.getStandaloneReportHTML();
|
5813
5825
|
}
|
5814
5826
|
|
5815
5827
|
/**
|