Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

report: add options onPrintOverride and onSaveFileOverride #13529

Merged
merged 10 commits into from
Feb 16, 2022

Conversation

connorjclark
Copy link
Collaborator

similar to #13518

* @param {Blob|File} blob
*/
_saveFile(blob) {
const filename = getLhrFilenamePrefix(this.json);
this._dom.saveFile(blob, filename);
const ext = blob.type.match('json') ? '.json' : '.html';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flow report won't include a file extension automatically now, can you update:

function saveHtml(flowResult: LH.FlowResult, htmlStr: string) {
const blob = new Blob([htmlStr], {type: 'text/html'});
const filename = getFlowResultFilenamePrefix(flowResult);
saveFile(blob, filename);
}

@connorjclark connorjclark changed the title report: allow client to configure how printing and saving is implemented report: add options onPrintOverride and onSaveFileOverride Feb 16, 2022
@connorjclark connorjclark merged commit f684e1f into master Feb 16, 2022
@connorjclark connorjclark deleted the reportui-print-save branch February 16, 2022 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants