Skip to content

Commit

Permalink
chore: add comment for viewer's opened postMessage (GoogleChrome#425)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish authored and dkrasnov-travix committed Oct 29, 2020
1 parent dd765ed commit f1ee010
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/server/src/ui/components/lhr-viewer-link.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export function openLhrInClassicViewer(lhr) {
if (messageEvent.origin !== VIEWER_ORIGIN) {
return;
}
// https://github.com/GoogleChrome/lighthouse/blob/35f1a6f90e9443bdf42179a4c9823e6d4848a9e6/lighthouse-viewer/app/src/lighthouse-report-viewer.js#L415-L418
if (popup && messageEvent.data.opened) {
popup.postMessage({lhresults: lhr}, VIEWER_ORIGIN);
window.removeEventListener('message', msgHandler);
Expand Down

0 comments on commit f1ee010

Please sign in to comment.