this post was submitted on 08 Jul 2023
8 points (90.0% liked)
JavaScript
2004 readers
1 users here now
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I have tested the code in both Chrome and MS Edge.
Is anything else running on the same page that you are testing?
You can test this in an empty environment like this: Enter this in your URL, "about:blank" and test the code in the console.
I tried it in about:blank but it does the same. Maybe there is some extension in my browser that slows it down (somehow). Im running tampermonkey but it's not active on any pages I tried this on.
I ran the script in nodejs and everything works perfectly, the sleep time is very close to the original value so it's definitely something inside browser that causes it to lag.