report: allow client to configure how save-html is implemented #13518
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #13410
Currently we vary how this is implemented by overriding a function in ReportUIFeatures. See the following from DevTools:
https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/panels/lighthouse/LighthouseReportRenderer.ts;l=175;drc=93a4454b7c558d6ca748c718167bc4aa592eaf63
Ideally we'd be able to provide a default implementation that worked in all clients, but there are some issues:
document.documentElement.outerHTMLonly works for the standalone report. If the report is embedded into some arbitrary page, this is too much.DevTools (aside: we still need to migrate it to use the new report API) will continue to use
Lighthouse.ReportGenerator(which is included as a separate bundle), but instead of overriding that function we will use this new option.