Skip to content

onINP: PerformanceEventTiming is not defined in Firefox 88- #402

@steffenweber

Description

@steffenweber

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions