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

Move the support check to the top of the onINP() function #490

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

philipwalton
Copy link
Member

Currently, the onINP() function will register a PerformanceObserver and callback in Firefox, despite the fact that it will not report any INP value (given that Firefox doesn't support the interactionId property).

This PR moves the feature detection code to the top level of the onINP() function, so it's essentially a noop in Firefox.

@philipwalton philipwalton merged commit 66f3938 into main Jun 6, 2024
8 checks passed
@philipwalton philipwalton deleted the ff-inp branch June 6, 2024 18:34
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.

None yet

2 participants