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

Ensure reports only occur if a PO was created #58

Merged
merged 1 commit into from
Jun 26, 2020
Merged

Conversation

philipwalton
Copy link
Member

Fixes #57

This PR updates all metric functions (e.g. getCLS()) to ensure that their callback does not run if the browser does not support the metric (i.e. cannnot create a PerformanceObserver and observe the required entry type needed for the metric). It also adds tests to check that nothing is reported in browsers that don't support the metric.

@philipwalton philipwalton merged commit dcc63a5 into master Jun 26, 2020
@philipwalton philipwalton deleted the cls-report branch October 23, 2020 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLS is reported in browsers that don't support it
1 participant