Calling onINP triggers a JavaScript error in Firefox 88 (and older). It's totally fine that this library doesn't (fully) support older browsers, of course, but maybe throwing this JavaScript error could be avoided.
Reduced test-case:
<script type="module">
import {onINP} from 'https://unpkg.com/web-vitals@3?module';
onINP(console.log, true);
</script>
Resulting error:
Uncaught ReferenceError: PerformanceEventTiming is not defined
Q https://unpkg.com/web-vitals@3?module:1
C https://unpkg.com/web-vitals@3?module:1
Q https://unpkg.com/web-vitals@3?module:1
<anonymous> test.html:3
Calling
onINP
triggers a JavaScript error in Firefox 88 (and older). It's totally fine that this library doesn't (fully) support older browsers, of course, but maybe throwing this JavaScript error could be avoided.Reduced test-case:
Resulting error: