Skip to content

Time out in smooth-scroll-nonstop.html #54258

@abdelrahman1234567

Description

@abdelrahman1234567

On line 52, there's a bug in the JavaScript code:

let last_update_time = performance.now;

This should be:

let last_update_time = performance.now();

The code is assigning the function reference instead of calling the function to get the current time. This means last_update_time will be the performance.now function itself, not a timestamp. When the code later tries to do arithmetic with performance.now() - last_update_time, it's doing a number minus a function, which results in NaN and that result in the test to timeout.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions