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: extract init() function from report-template #8228

Merged
merged 2 commits into from
Apr 12, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lighthouse-core/report/html/report-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</script>
<script>window.__LIGHTHOUSE_JSON__ = %%LIGHTHOUSE_JSON%%;</script>
<script>
window.addEventListener('DOMContentLoaded', _ => {
function __initLighthouseReport__(){
paulirish marked this conversation as resolved.
Show resolved Hide resolved
const dom = new DOM(document);
const renderer = new ReportRenderer(dom);

Expand All @@ -47,7 +47,8 @@
// is in the document.
const features = new ReportUIFeatures(dom);
features.initFeatures(window.__LIGHTHOUSE_JSON__);
});
}
window.addEventListener('DOMContentLoaded', __initLighthouseReport__);

document.addEventListener('lh-analytics', e => {
if (window.ga) {
Expand Down