lighthouse 9.5.0-dev.20220607 → 9.6.2
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/dist/report/bundle.esm.js +467 -520
- package/dist/report/flow.js +22 -22
- package/dist/report/standalone.js +19 -19
- package/flow-report/src/summary/category.tsx +1 -1
- package/flow-report/src/topbar.tsx +2 -10
- package/flow-report/src/util.ts +1 -1
- package/flow-report/test/topbar-test.tsx +8 -7
- package/jest.config.js +1 -1
- package/lighthouse-cli/.eslintrc.cjs +4 -3
- package/lighthouse-cli/bin.js +1 -0
- package/lighthouse-cli/cli-flags.js +4 -3
- package/lighthouse-cli/commands/commands.js +1 -0
- package/lighthouse-cli/commands/list-audits.js +1 -0
- package/lighthouse-cli/commands/list-locales.js +1 -0
- package/lighthouse-cli/commands/list-trace-categories.js +1 -0
- package/lighthouse-cli/index.js +1 -0
- package/lighthouse-cli/printer.js +1 -0
- package/lighthouse-cli/run.js +24 -9
- package/lighthouse-cli/sentry-prompt.js +1 -0
- package/lighthouse-cli/test/smokehouse/core-tests.js +1 -0
- package/lighthouse-cli/test/smokehouse/frontends/back-compat-util.js +1 -0
- package/lighthouse-cli/test/smokehouse/frontends/lib.js +1 -0
- package/lighthouse-cli/test/smokehouse/frontends/node.js +1 -0
- package/lighthouse-cli/test/smokehouse/frontends/smokehouse-bin.js +1 -0
- package/lighthouse-cli/test/smokehouse/lib/child-process-error.js +1 -0
- package/lighthouse-cli/test/smokehouse/lib/concurrent-mapper.js +1 -0
- package/lighthouse-cli/test/smokehouse/lib/local-console.js +1 -0
- package/lighthouse-cli/test/smokehouse/lighthouse-runners/bundle.js +23 -109
- package/lighthouse-cli/test/smokehouse/lighthouse-runners/cli.js +3 -2
- package/lighthouse-cli/test/smokehouse/lighthouse-runners/devtools.js +19 -28
- package/lighthouse-cli/test/smokehouse/report-assert.js +4 -3
- package/lighthouse-cli/test/smokehouse/smokehouse.js +1 -1
- package/lighthouse-cli/test/smokehouse/version-check-test.js +3 -0
- package/lighthouse-cli/test/smokehouse/version-check.js +1 -0
- package/lighthouse-core/audits/accessibility/accesskeys.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-allowed-attr.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-command-name.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-hidden-body.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-hidden-focus.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-input-field-name.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-meter-name.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-progressbar-name.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-required-attr.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-required-children.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-required-parent.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-roles.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-toggle-field-name.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-tooltip-name.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-treeitem-name.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-valid-attr-value.js +1 -1
- package/lighthouse-core/audits/accessibility/aria-valid-attr.js +1 -1
- package/lighthouse-core/audits/accessibility/button-name.js +1 -1
- package/lighthouse-core/audits/accessibility/bypass.js +1 -1
- package/lighthouse-core/audits/accessibility/color-contrast.js +1 -1
- package/lighthouse-core/audits/accessibility/definition-list.js +1 -1
- package/lighthouse-core/audits/accessibility/dlitem.js +1 -1
- package/lighthouse-core/audits/accessibility/document-title.js +1 -1
- package/lighthouse-core/audits/accessibility/duplicate-id-active.js +1 -1
- package/lighthouse-core/audits/accessibility/duplicate-id-aria.js +1 -1
- package/lighthouse-core/audits/accessibility/form-field-multiple-labels.js +1 -1
- package/lighthouse-core/audits/accessibility/frame-title.js +1 -1
- package/lighthouse-core/audits/accessibility/heading-order.js +1 -1
- package/lighthouse-core/audits/accessibility/html-has-lang.js +1 -1
- package/lighthouse-core/audits/accessibility/html-lang-valid.js +1 -1
- package/lighthouse-core/audits/accessibility/image-alt.js +1 -1
- package/lighthouse-core/audits/accessibility/input-image-alt.js +1 -1
- package/lighthouse-core/audits/accessibility/label.js +1 -1
- package/lighthouse-core/audits/accessibility/link-name.js +1 -1
- package/lighthouse-core/audits/accessibility/list.js +1 -1
- package/lighthouse-core/audits/accessibility/listitem.js +5 -5
- package/lighthouse-core/audits/accessibility/meta-refresh.js +1 -1
- package/lighthouse-core/audits/accessibility/meta-viewport.js +1 -1
- package/lighthouse-core/audits/accessibility/object-alt.js +1 -1
- package/lighthouse-core/audits/accessibility/tabindex.js +1 -1
- package/lighthouse-core/audits/accessibility/td-headers-attr.js +1 -1
- package/lighthouse-core/audits/accessibility/th-has-data-cells.js +1 -1
- package/lighthouse-core/audits/accessibility/valid-lang.js +1 -1
- package/lighthouse-core/audits/accessibility/video-caption.js +1 -1
- package/lighthouse-core/audits/byte-efficiency/byte-efficiency-audit.js +1 -2
- package/lighthouse-core/audits/byte-efficiency/duplicated-javascript.js +12 -11
- package/lighthouse-core/audits/byte-efficiency/efficient-animated-content.js +1 -1
- package/lighthouse-core/audits/byte-efficiency/legacy-javascript.js +24 -22
- package/lighthouse-core/audits/byte-efficiency/offscreen-images.js +2 -3
- package/lighthouse-core/audits/byte-efficiency/render-blocking-resources.js +3 -2
- package/lighthouse-core/audits/byte-efficiency/unminified-css.js +5 -3
- package/lighthouse-core/audits/byte-efficiency/unminified-javascript.js +11 -10
- package/lighthouse-core/audits/byte-efficiency/unused-css-rules.js +1 -0
- package/lighthouse-core/audits/byte-efficiency/unused-javascript.js +8 -11
- package/lighthouse-core/audits/byte-efficiency/uses-responsive-images.js +1 -1
- package/lighthouse-core/audits/byte-efficiency/uses-text-compression.js +1 -1
- package/lighthouse-core/audits/deprecations.js +598 -8
- package/lighthouse-core/audits/diagnostics.js +3 -4
- package/lighthouse-core/audits/dobetterweb/doctype.js +9 -20
- package/lighthouse-core/audits/dobetterweb/geolocation-on-start.js +1 -1
- package/lighthouse-core/audits/dobetterweb/no-document-write.js +1 -1
- package/lighthouse-core/audits/dobetterweb/notification-on-start.js +1 -1
- package/lighthouse-core/audits/dobetterweb/uses-http2.js +1 -2
- package/lighthouse-core/audits/dobetterweb/uses-passive-event-listeners.js +1 -1
- package/lighthouse-core/audits/errors-in-console.js +2 -2
- package/lighthouse-core/audits/long-tasks.js +2 -3
- package/lighthouse-core/audits/metrics/first-contentful-paint-3g.js +2 -2
- package/lighthouse-core/audits/metrics/first-contentful-paint.js +2 -3
- package/lighthouse-core/audits/metrics/first-meaningful-paint.js +2 -3
- package/lighthouse-core/audits/metrics/interactive.js +2 -3
- package/lighthouse-core/audits/metrics/largest-contentful-paint.js +2 -3
- package/lighthouse-core/audits/metrics/max-potential-fid.js +2 -3
- package/lighthouse-core/audits/metrics/speed-index.js +2 -3
- package/lighthouse-core/audits/metrics/total-blocking-time.js +2 -3
- package/lighthouse-core/audits/metrics.js +2 -3
- package/lighthouse-core/audits/no-unload-listeners.js +15 -7
- package/lighthouse-core/audits/predictive-perf.js +1 -2
- package/lighthouse-core/audits/preload-lcp-image.js +3 -3
- package/lighthouse-core/audits/redirects.js +1 -1
- package/lighthouse-core/audits/script-treemap-data.js +45 -45
- package/lighthouse-core/audits/seo/http-status-code.js +4 -2
- package/lighthouse-core/audits/seo/link-text.js +0 -2
- package/lighthouse-core/audits/server-response-time.js +17 -2
- package/lighthouse-core/audits/service-worker.js +2 -7
- package/lighthouse-core/audits/timing-budget.js +2 -3
- package/lighthouse-core/audits/uses-rel-preconnect.js +1 -1
- package/lighthouse-core/audits/uses-rel-preload.js +1 -1
- package/lighthouse-core/audits/valid-source-maps.js +14 -12
- package/lighthouse-core/audits/violation-audit.js +1 -1
- package/lighthouse-core/audits/work-during-interaction.js +2 -2
- package/lighthouse-core/computed/critical-request-chains.js +9 -5
- package/lighthouse-core/computed/js-bundles.js +11 -11
- package/lighthouse-core/computed/main-resource.js +2 -3
- package/lighthouse-core/computed/metrics/first-contentful-paint-all-frames.js +1 -1
- package/lighthouse-core/computed/metrics/first-contentful-paint.js +1 -1
- package/lighthouse-core/computed/metrics/first-meaningful-paint.js +1 -1
- package/lighthouse-core/computed/metrics/interactive.js +1 -1
- package/lighthouse-core/computed/metrics/lantern-first-contentful-paint.js +1 -1
- package/lighthouse-core/computed/metrics/lantern-first-meaningful-paint.js +1 -1
- package/lighthouse-core/computed/metrics/lantern-interactive.js +1 -1
- package/lighthouse-core/computed/metrics/lantern-largest-contentful-paint.js +1 -1
- package/lighthouse-core/computed/metrics/lantern-max-potential-fid.js +1 -1
- package/lighthouse-core/computed/metrics/lantern-metric.js +5 -3
- package/lighthouse-core/computed/metrics/lantern-speed-index.js +1 -1
- package/lighthouse-core/computed/metrics/lantern-total-blocking-time.js +1 -1
- package/lighthouse-core/computed/metrics/largest-contentful-paint-all-frames.js +1 -1
- package/lighthouse-core/computed/metrics/largest-contentful-paint.js +1 -1
- package/lighthouse-core/computed/metrics/max-potential-fid.js +1 -1
- package/lighthouse-core/computed/metrics/metric.js +0 -1
- package/lighthouse-core/computed/metrics/speed-index.js +1 -1
- package/lighthouse-core/computed/metrics/timing-summary.js +6 -13
- package/lighthouse-core/computed/metrics/total-blocking-time.js +1 -1
- package/lighthouse-core/computed/module-duplication.js +5 -6
- package/lighthouse-core/computed/page-dependency-graph.js +28 -55
- package/lighthouse-core/computed/resource-summary.js +5 -5
- package/lighthouse-core/computed/unused-css.js +7 -6
- package/lighthouse-core/computed/unused-javascript-summary.js +36 -16
- package/lighthouse-core/config/budget.js +2 -2
- package/lighthouse-core/config/default-config.js +1 -2
- package/lighthouse-core/fraggle-rock/api.js +1 -1
- package/lighthouse-core/fraggle-rock/config/default-config.js +0 -3
- package/lighthouse-core/fraggle-rock/gather/base-artifacts.js +3 -6
- package/lighthouse-core/fraggle-rock/gather/driver.js +2 -2
- package/lighthouse-core/fraggle-rock/gather/navigation-runner.js +26 -51
- package/lighthouse-core/fraggle-rock/gather/runner-helpers.js +3 -0
- package/lighthouse-core/fraggle-rock/gather/session.js +22 -23
- package/lighthouse-core/fraggle-rock/gather/snapshot-runner.js +4 -5
- package/lighthouse-core/fraggle-rock/gather/timespan-runner.js +6 -6
- package/lighthouse-core/gather/connections/cri.js +1 -5
- package/lighthouse-core/gather/driver/execution-context.js +2 -5
- package/lighthouse-core/gather/driver/navigation.js +10 -13
- package/lighthouse-core/gather/driver/network-monitor.js +3 -16
- package/lighthouse-core/gather/driver.js +1 -6
- package/lighthouse-core/gather/fetcher.js +210 -34
- package/lighthouse-core/gather/gather-runner.js +17 -13
- package/lighthouse-core/gather/gatherers/accessibility.js +4 -16
- package/lighthouse-core/gather/gatherers/console-messages.js +2 -4
- package/lighthouse-core/gather/gatherers/dobetterweb/doctype.js +2 -4
- package/lighthouse-core/gather/gatherers/full-page-screenshot.js +2 -3
- package/lighthouse-core/gather/gatherers/iframe-elements.js +1 -4
- package/lighthouse-core/gather/gatherers/image-elements.js +0 -2
- package/lighthouse-core/gather/gatherers/js-usage.js +87 -12
- package/lighthouse-core/gather/gatherers/link-elements.js +14 -12
- package/lighthouse-core/gather/gatherers/main-document-content.js +8 -8
- package/lighthouse-core/gather/gatherers/script-elements.js +56 -7
- package/lighthouse-core/gather/gatherers/seo/robots-txt.js +30 -2
- package/lighthouse-core/gather/gatherers/source-maps.js +1 -8
- package/lighthouse-core/gather/gatherers/web-app-manifest.js +2 -2
- package/lighthouse-core/index.js +2 -26
- package/lighthouse-core/lib/cdt/generated/SourceMap.js +1 -1
- package/lighthouse-core/lib/dependency-graph/simulator/network-analyzer.js +29 -8
- package/lighthouse-core/lib/navigation-error.js +4 -13
- package/lighthouse-core/lib/page-functions.js +1 -3
- package/lighthouse-core/lib/script-helpers.js +6 -11
- package/lighthouse-core/lib/url-shim.js +2 -2
- package/lighthouse-core/runner.js +5 -0
- package/lighthouse-core/scripts/manual-chrome-launcher.js +1 -0
- package/lighthouse-core/util-commonjs.js +6 -8
- package/package.json +13 -13
- package/readme.md +1 -1
- package/report/.eslintrc.cjs +1 -3
- package/report/assets/styles.css +5 -10
- package/report/assets/templates.html +9 -10
- package/report/clients/bundle.js +1 -0
- package/report/clients/standalone.js +1 -0
- package/report/generator/report-generator.js +21 -46
- package/report/renderer/api.js +2 -0
- package/report/renderer/category-renderer.js +24 -20
- package/report/renderer/components.js +304 -303
- package/report/renderer/crc-details-renderer.js +24 -21
- package/report/renderer/details-renderer.js +12 -12
- package/report/renderer/dom.js +7 -6
- package/report/renderer/drop-down-menu.js +1 -0
- package/report/renderer/element-screenshot-renderer.js +5 -1
- package/report/renderer/features-util.js +1 -0
- package/report/renderer/i18n.js +62 -118
- package/report/renderer/logger.js +1 -0
- package/report/renderer/open-tab.js +3 -1
- package/report/renderer/performance-category-renderer.js +11 -10
- package/report/renderer/pwa-category-renderer.js +4 -3
- package/report/renderer/report-renderer.js +17 -17
- package/report/renderer/report-ui-features.js +1 -0
- package/report/renderer/snippet-renderer.js +3 -2
- package/report/renderer/swap-locale-feature.js +1 -0
- package/report/renderer/text-encoding.js +1 -0
- package/report/renderer/topbar-features.js +1 -0
- package/report/renderer/util.js +6 -7
- package/report/test/clients/bundle-test.js +5 -0
- package/report/test/generator/file-namer-test.js +1 -0
- package/report/test/generator/report-generator-test.js +20 -25
- package/report/test/renderer/category-renderer-test.js +4 -3
- package/report/test/renderer/components-test.js +3 -0
- package/report/test/renderer/crc-details-renderer-test.js +3 -0
- package/report/test/renderer/details-renderer-test.js +3 -49
- package/report/test/renderer/dom-test.js +3 -0
- package/report/test/renderer/element-screenshot-renderer-test.js +6 -3
- package/report/test/renderer/i18n-test.js +25 -70
- package/report/test/renderer/performance-category-renderer-test.js +5 -14
- package/report/test/renderer/pwa-category-renderer-test.js +4 -3
- package/report/test/renderer/report-renderer-axe-test.js +4 -3
- package/report/test/renderer/report-renderer-test.js +4 -3
- package/report/test/renderer/report-ui-features-test.js +4 -3
- package/report/test/renderer/snippet-renderer-test.js +3 -0
- package/report/test/renderer/text-encoding-test.js +3 -0
- package/report/test/renderer/util-test.js +5 -4
- package/report/test-assets/faux-psi.js +1 -2
- package/shared/localization/format.js +3 -7
- package/shared/localization/locales/en-US.json +238 -55
- package/shared/localization/locales/en-XL.json +238 -55
- package/shared/test/localization/format-test.js +2 -8
- package/shared/test/localization/locales-test.js +2 -0
- package/shared/test/localization/swap-locale-test.js +2 -0
- package/third-party/chromium-synchronization/inspector-issueAdded-types-test.js +2 -0
- package/third-party/chromium-synchronization/installability-errors-test.js +2 -0
- package/tsconfig.json +0 -1
- package/types/artifacts.d.ts +8 -47
- package/types/config.d.ts +0 -2
- package/types/externs.d.ts +2 -3
- package/types/gatherer.d.ts +2 -1
- package/types/global-lh.d.ts +0 -3
- package/types/lhr/lhr.d.ts +2 -2
- package/types/lhr/treemap.d.ts +1 -0
- package/changelog.md +0 -5902
- package/lighthouse-core/audits/script-elements-test-audit.js +0 -30
- package/lighthouse-core/gather/gatherers/scripts.js +0 -154
- package/lighthouse-core/scripts/package.json +0 -4
- package/report/test/.eslintrc.cjs +0 -11
- package/shared/test/localization/.eslintrc.cjs +0 -11
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
+
'use strict';
|
|
17
18
|
|
|
18
19
|
/** @typedef {import('./dom.js').DOM} DOM */
|
|
19
20
|
/** @typedef {import('./report-renderer.js').ReportRenderer} ReportRenderer */
|
|
@@ -72,9 +73,9 @@ export class CategoryRenderer {
|
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
const titleEl = this.dom.find('.lh-audit__title', auditEl);
|
|
75
|
-
titleEl.
|
|
76
|
+
titleEl.appendChild(this.dom.convertMarkdownCodeSnippets(audit.result.title));
|
|
76
77
|
const descEl = this.dom.find('.lh-audit__description', auditEl);
|
|
77
|
-
descEl.
|
|
78
|
+
descEl.appendChild(this.dom.convertMarkdownLinkSnippets(audit.result.description));
|
|
78
79
|
|
|
79
80
|
for (const relevantMetric of audit.relevantMetrics || []) {
|
|
80
81
|
const adornEl = this.dom.createChildOf(descEl, 'span', 'lh-audit__adorn');
|
|
@@ -84,16 +85,19 @@ export class CategoryRenderer {
|
|
|
84
85
|
|
|
85
86
|
if (audit.stackPacks) {
|
|
86
87
|
audit.stackPacks.forEach(pack => {
|
|
87
|
-
const
|
|
88
|
+
const packElm = this.dom.createElement('div');
|
|
89
|
+
packElm.classList.add('lh-audit__stackpack');
|
|
90
|
+
|
|
91
|
+
const packElmImg = this.dom.createElement('img');
|
|
92
|
+
packElmImg.classList.add('lh-audit__stackpack__img');
|
|
88
93
|
packElmImg.src = pack.iconDataURL;
|
|
89
94
|
packElmImg.alt = pack.title;
|
|
95
|
+
packElm.appendChild(packElmImg);
|
|
90
96
|
|
|
91
|
-
|
|
92
|
-
const packElm = this.dom.createElement('div', 'lh-audit__stackpack');
|
|
93
|
-
packElm.append(packElmImg, snippets);
|
|
97
|
+
packElm.appendChild(this.dom.convertMarkdownLinkSnippets(pack.description));
|
|
94
98
|
|
|
95
99
|
this.dom.find('.lh-audit__stackpacks', auditEl)
|
|
96
|
-
.
|
|
100
|
+
.appendChild(packElm);
|
|
97
101
|
});
|
|
98
102
|
}
|
|
99
103
|
|
|
@@ -102,12 +106,12 @@ export class CategoryRenderer {
|
|
|
102
106
|
const elem = this.detailsRenderer.render(audit.result.details);
|
|
103
107
|
if (elem) {
|
|
104
108
|
elem.classList.add('lh-details');
|
|
105
|
-
header.
|
|
109
|
+
header.appendChild(elem);
|
|
106
110
|
}
|
|
107
111
|
}
|
|
108
112
|
|
|
109
113
|
// Add chevron SVG to the end of the summary
|
|
110
|
-
this.dom.find('.lh-chevron-container', auditEl).
|
|
114
|
+
this.dom.find('.lh-chevron-container', auditEl).appendChild(this._createChevron());
|
|
111
115
|
this._setRatingClass(auditEl, audit.result.score, scoreDisplayMode);
|
|
112
116
|
|
|
113
117
|
if (audit.result.scoreDisplayMode === 'error') {
|
|
@@ -129,7 +133,7 @@ export class CategoryRenderer {
|
|
|
129
133
|
const warningsEl = this.dom.createChildOf(summaryEl, 'div', 'lh-warnings');
|
|
130
134
|
this.dom.createChildOf(warningsEl, 'span').textContent = strings.warningHeader;
|
|
131
135
|
if (warnings.length === 1) {
|
|
132
|
-
warningsEl.
|
|
136
|
+
warningsEl.appendChild(this.dom.createTextNode(warnings.join('')));
|
|
133
137
|
} else {
|
|
134
138
|
const warningsUl = this.dom.createChildOf(warningsEl, 'ul');
|
|
135
139
|
for (const warning of warnings) {
|
|
@@ -204,11 +208,11 @@ export class CategoryRenderer {
|
|
|
204
208
|
|
|
205
209
|
const gaugeContainerEl = this.dom.find('.lh-score__gauge', component);
|
|
206
210
|
const gaugeEl = this.renderCategoryScore(category, groupDefinitions, options);
|
|
207
|
-
gaugeContainerEl.
|
|
211
|
+
gaugeContainerEl.appendChild(gaugeEl);
|
|
208
212
|
|
|
209
213
|
if (category.description) {
|
|
210
214
|
const descEl = this.dom.convertMarkdownLinkSnippets(category.description);
|
|
211
|
-
this.dom.find('.lh-category-header__description', component).
|
|
215
|
+
this.dom.find('.lh-category-header__description', component).appendChild(descEl);
|
|
212
216
|
}
|
|
213
217
|
|
|
214
218
|
return component;
|
|
@@ -227,13 +231,13 @@ export class CategoryRenderer {
|
|
|
227
231
|
|
|
228
232
|
this.dom.createChildOf(auditGroupHeader, 'span', 'lh-audit-group__title')
|
|
229
233
|
.textContent = group.title;
|
|
230
|
-
groupEl.
|
|
234
|
+
groupEl.appendChild(auditGroupHeader);
|
|
231
235
|
|
|
232
236
|
let footerEl = null;
|
|
233
237
|
if (group.description) {
|
|
234
238
|
footerEl = this.dom.convertMarkdownLinkSnippets(group.description);
|
|
235
239
|
footerEl.classList.add('lh-audit-group__description', 'lh-audit-group__footer');
|
|
236
|
-
groupEl.
|
|
240
|
+
groupEl.appendChild(footerEl);
|
|
237
241
|
}
|
|
238
242
|
|
|
239
243
|
return [groupEl, footerEl];
|
|
@@ -297,7 +301,7 @@ export class CategoryRenderer {
|
|
|
297
301
|
renderUnexpandableClump(auditRefs, groupDefinitions) {
|
|
298
302
|
const clumpElement = this.dom.createElement('div');
|
|
299
303
|
const elements = this._renderGroupedAudits(auditRefs, groupDefinitions);
|
|
300
|
-
elements.forEach(elem => clumpElement.
|
|
304
|
+
elements.forEach(elem => clumpElement.appendChild(elem));
|
|
301
305
|
return clumpElement;
|
|
302
306
|
}
|
|
303
307
|
|
|
@@ -331,7 +335,7 @@ export class CategoryRenderer {
|
|
|
331
335
|
if (description) {
|
|
332
336
|
const descriptionEl = this.dom.convertMarkdownLinkSnippets(description);
|
|
333
337
|
descriptionEl.classList.add('lh-audit-group__description', 'lh-audit-group__footer');
|
|
334
|
-
el.
|
|
338
|
+
el.appendChild(descriptionEl);
|
|
335
339
|
}
|
|
336
340
|
|
|
337
341
|
this.dom.find('.lh-clump-toggletext--show', el).textContent = Util.i18n.strings.show;
|
|
@@ -423,7 +427,7 @@ export class CategoryRenderer {
|
|
|
423
427
|
const content = this.dom.find('.lh-fraction__content', tmpl);
|
|
424
428
|
const text = this.dom.createElement('span');
|
|
425
429
|
text.textContent = `${numPassed}/${numPassableAudits}`;
|
|
426
|
-
content.
|
|
430
|
+
content.appendChild(text);
|
|
427
431
|
|
|
428
432
|
let rating = Util.calculateRating(fraction);
|
|
429
433
|
|
|
@@ -527,7 +531,7 @@ export class CategoryRenderer {
|
|
|
527
531
|
render(category, groupDefinitions = {}, options) {
|
|
528
532
|
const element = this.dom.createElement('div', 'lh-category');
|
|
529
533
|
element.id = category.id;
|
|
530
|
-
element.
|
|
534
|
+
element.appendChild(this.renderCategoryHeader(category, groupDefinitions, options));
|
|
531
535
|
|
|
532
536
|
// Top level clumps for audits, in order they will appear in the report.
|
|
533
537
|
/** @type {Map<TopLevelClumpId, Array<LH.ReportResult.AuditRef>>} */
|
|
@@ -560,13 +564,13 @@ export class CategoryRenderer {
|
|
|
560
564
|
if (clumpId === 'failed') {
|
|
561
565
|
const clumpElem = this.renderUnexpandableClump(auditRefs, groupDefinitions);
|
|
562
566
|
clumpElem.classList.add(`lh-clump--failed`);
|
|
563
|
-
element.
|
|
567
|
+
element.appendChild(clumpElem);
|
|
564
568
|
continue;
|
|
565
569
|
}
|
|
566
570
|
|
|
567
571
|
const description = clumpId === 'manual' ? category.manualDescription : undefined;
|
|
568
572
|
const clumpElem = this.renderClump(clumpId, {auditRefs, description});
|
|
569
|
-
element.
|
|
573
|
+
element.appendChild(clumpElem);
|
|
570
574
|
}
|
|
571
575
|
|
|
572
576
|
return element;
|