From 111a0c820c592437422cb92b9f4de39b31c8c265 Mon Sep 17 00:00:00 2001 From: Paul Irish Date: Thu, 13 Apr 2017 17:10:13 -0700 Subject: [PATCH] feedback. --- lighthouse-core/report/v2/renderer/details-renderer.js | 2 +- lighthouse-core/report/v2/renderer/dom.js | 2 +- lighthouse-core/report/v2/renderer/report-renderer.js | 8 ++++---- lighthouse-core/report/v2/report-template.html | 7 +++++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lighthouse-core/report/v2/renderer/details-renderer.js b/lighthouse-core/report/v2/renderer/details-renderer.js index 57ee9507871c..2d2964999078 100644 --- a/lighthouse-core/report/v2/renderer/details-renderer.js +++ b/lighthouse-core/report/v2/renderer/details-renderer.js @@ -87,7 +87,7 @@ class DetailsRenderer { if (typeof module !== 'undefined' && module.exports) { module.exports = DetailsRenderer; -} else if (self) { +} else { self.DetailsRenderer = DetailsRenderer; } diff --git a/lighthouse-core/report/v2/renderer/dom.js b/lighthouse-core/report/v2/renderer/dom.js index ff7fa310ffb8..a5e9413e4b07 100644 --- a/lighthouse-core/report/v2/renderer/dom.js +++ b/lighthouse-core/report/v2/renderer/dom.js @@ -95,6 +95,6 @@ class DOM { if (typeof module !== 'undefined' && module.exports) { module.exports = DOM; -} else if (self) { +} else { self.DOM = DOM; } diff --git a/lighthouse-core/report/v2/renderer/report-renderer.js b/lighthouse-core/report/v2/renderer/report-renderer.js index b5533b21fa3c..293869854b1f 100644 --- a/lighthouse-core/report/v2/renderer/report-renderer.js +++ b/lighthouse-core/report/v2/renderer/report-renderer.js @@ -56,12 +56,12 @@ function formatNumber(number) { class ReportRenderer { /** - * @param {!Document} document * @param {!DOM} DOM * @param {!DetailsRenderer} DetailsRenderer */ - constructor(document, DOM, DetailsRenderer) { - this._detailsRenderer = new DetailsRenderer(this._dom); + constructor(dom, detailsRenderer) { + this._dom = dom; + this._detailsRenderer = detailsRenderer; } /** @@ -184,7 +184,7 @@ class ReportRenderer { if (typeof module !== 'undefined' && module.exports) { module.exports = ReportRenderer; -} else if (self) { +} else { self.ReportRenderer = ReportRenderer; } diff --git a/lighthouse-core/report/v2/report-template.html b/lighthouse-core/report/v2/report-template.html index e06c03e08d5e..627c4047f251 100644 --- a/lighthouse-core/report/v2/report-template.html +++ b/lighthouse-core/report/v2/report-template.html @@ -30,8 +30,11 @@