diff --git a/build/build-dt-report-resources.js b/build/build-dt-report-resources.js index 0e568c59fbac..4793c6243e34 100644 --- a/build/build-dt-report-resources.js +++ b/build/build-dt-report-resources.js @@ -36,8 +36,8 @@ writeFile('templates.html', htmlReportAssets.REPORT_TEMPLATES); const pathToReportAssets = require.resolve('../clients/devtools-report-assets.js'); browserify(generatorFilename, {standalone: 'Lighthouse.ReportGenerator'}) - // Shims './html/html-report-assets' to resolve to devtools-report-assets. - .require(pathToReportAssets, {expose: './html/html-report-assets'}) + // Shims './html/html-report-assets.js' to resolve to devtools-report-assets.js + .require(pathToReportAssets, {expose: './html/html-report-assets.js'}) .bundle((err, src) => { if (err) throw err; fs.writeFileSync(bundleOutFile, src.toString()); diff --git a/lighthouse-core/report/html/renderer/report-ui-features.js b/lighthouse-core/report/html/renderer/report-ui-features.js index 213199757c28..bd5e778a46cc 100644 --- a/lighthouse-core/report/html/renderer/report-ui-features.js +++ b/lighthouse-core/report/html/renderer/report-ui-features.js @@ -421,12 +421,12 @@ class ReportUIFeatures { case 'print-summary': this.collapseAllDetails(); this.closeToolsDropdown(); - self.print(); + this._print(); break; case 'print-expanded': this.expandAllDetails(); this.closeToolsDropdown(); - self.print(); + this._print(); break; case 'save-json': { const jsonStr = JSON.stringify(this.json, null, 2); @@ -463,6 +463,10 @@ class ReportUIFeatures { this._document.removeEventListener('keydown', this.onKeyDown); } + _print() { + self.print(); + } + /** * Keydown handler for the document. * @param {KeyboardEvent} e diff --git a/lighthouse-core/report/html/templates.html b/lighthouse-core/report/html/templates.html index ffa2f896fd4c..7e6180346c54 100644 --- a/lighthouse-core/report/html/templates.html +++ b/lighthouse-core/report/html/templates.html @@ -263,15 +263,6 @@ cursor: pointer; margin-right: 5px; } - /* - Some features in the tools dropdown menu don't work in the DevTools - client. They could with some tweaks, but currently they don't. For example: - Saving as HTML/JSON - does not bring up a file dialog, as one would expect in DevTools. - also, it saves the AuditsPanel HTML, which is funky. - */ - .lh-devtools .lh-tools__button { - display: none; - } .lh-tools__button svg { fill: var(--lh-tools-icon-color); }