Skip to content

Commit

Permalink
report: small renderAudit simplification (#15725)
Browse files Browse the repository at this point in the history
  • Loading branch information
brendankenny authored Jan 4, 2024
1 parent 4e4a835 commit 30e617e
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions report/renderer/category-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,9 @@ export class CategoryRenderer {
* @return {HTMLElement}
*/
renderAudit(audit) {
const component = this.dom.createComponent('audit');
return /** @type {HTMLElement} */ (this.populateAuditValues(audit, component));
}

/**
* Populate an DOM tree with audit details. Used by renderAudit and renderOpportunity
* @param {LH.ReportResult.AuditRef} audit
* @param {DocumentFragment} component
* @return {!Element}
*/
populateAuditValues(audit, component) {
const strings = Globals.strings;
const auditEl = this.dom.find('.lh-audit', component);
const component = this.dom.createComponent('audit');
const auditEl = this.dom.find('div.lh-audit', component);
auditEl.id = audit.result.id;
const scoreDisplayMode = audit.result.scoreDisplayMode;

Expand Down

0 comments on commit 30e617e

Please sign in to comment.