Skip to content

misc(viewer): expose LHR as __LIGHTHOUSE_JSON__#10879

Merged
paulirish merged 2 commits into
masterfrom
lhjson__
Jun 16, 2020
Merged

misc(viewer): expose LHR as __LIGHTHOUSE_JSON__#10879
paulirish merged 2 commits into
masterfrom
lhjson__

Conversation

@paulirish

Copy link
Copy Markdown
Member

Whenever I'm hacking on the viewer i always want this feature.

I've also added a console.log in the viewer and the normal report. We've had users definitely appreciate learning about this global, so I think it's valuable.

@paulirish paulirish requested a review from a team as a code owner May 29, 2020 21:15
@paulirish paulirish requested review from connorjclark and removed request for a team May 29, 2020 21:15

@patrickhulce patrickhulce left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

❤️ this! had to do this with the CI viewer too obvs, huge feature :D

'use strict';

/* global DOM, ViewerUIFeatures, ReportRenderer, DragAndDrop, GithubApi, PSIApi, logger, idbKeyval */
/* global DOM, ViewerUIFeatures, ReportRenderer, DragAndDrop, GithubApi, PSIApi, logger, idbKeyval, __LIGHTHOUSE_JSON__ */

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we don't use it as a global, I think you just need to do some typescript fanagling

@paulirish paulirish merged commit b04b641 into master Jun 16, 2020
@paulirish paulirish deleted the lhjson__ branch June 16, 2020 20:53
makunde pushed a commit to makunde/lighthouse that referenced this pull request Jul 6, 2020
makunde pushed a commit to makunde/lighthouse that referenced this pull request Aug 28, 2020
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.

5 participants