Skip to content

Allow to reset the INP calculation #448

Open
@Mattstir

Description

@Mattstir

Hi,

it would be awesome if the package would offer a resetINP function or something similar.

Use case
We would need this feature as we take a look at the "subpages" of SPAs as individual pages and would be highly interested in the individual INP values of them. Because of the way the entries are collected in longestInteractionList this of course is not really possible.

Possible Solution
I guess clearing prevInteractionCount, prevInteractionCount, longestInteractionMap in this new reset function should be enough? Or do I miss something here?

Value
This clear function would allow for more different use cases (in combination with the already present reportAllChanges: true) while increasing the complexity and package size only slightly. I think this is a valuable addition!
Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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