renderReport(report, container) {
    // If any mutations happen to the report within the renderers, we want the original object untouched
    const clone = /** @type {ReportJSON} */ (JSON.parse(JSON.stringify(report)));

    // TODO(phulce): we all agree this is technical debt we should fix
    if (typeof clone.categories !== 'object') throw new Error('No categories provided.');
    clone.reportCategories = Object.values(clone.categories);
    ReportRenderer.smooshAuditResultsIntoCategories(clone.audits, clone.reportCategories);

    container.textContent = ''; // Remove previous report.
    container.appendChild(this._renderReport(clone));
    return /** @type {Element} **/ (container);
  }
/**
   * @param {ReportJSON} report
   * @param {Element} container Parent element to render the report into.
   */
@param {ReportJSON} report
@param {Element} container Parent element to render the report into.
@param { ReportJSON } report @param { Element } container Parent element to render the report into .
renderReport(report, container) {
    const clone =  (JSON.parse(JSON.stringify(report)));
    if (typeof clone.categories !== 'object') throw new Error('No categories provided.');
    clone.reportCategories = Object.values(clone.categories);
    ReportRenderer.smooshAuditResultsIntoCategories(clone.audits, clone.reportCategories);
    container.textContent = ''; 
    container.appendChild(this._renderReport(clone));
    return  (container);
  }
renderReport ( report , container ) { const clone = ( JSON . parse ( JSON . stringify ( report ) ) ) ; if ( typeof clone . categories !== 'object' ) throw new Error ( 'No categories provided.' ) ; clone . reportCategories = Object . values ( clone . categories ) ; ReportRenderer . smooshAuditResultsIntoCategories ( clone . audits , clone . reportCategories ) ; container . textContent = '' ; container . appendChild ( this . _renderReport ( clone ) ) ; return ( container ) ; }
@param {ReportJSON} report
 @param {Element} container Parent element to render the report into.
@param { ReportJSON } report @param { Element } container Parent element to render the report into .
// If any mutations happen to the report within the renderers, we want the original object untouched /** @type {ReportJSON} */ // TODO(phulce): we all agree this is technical debt we should fix // Remove previous report. /** @type {Element} **/