Hello internet
I'm going slowly mad because of a weird `setTimeout` bug that I discovered today where it seems to call the function before the delay is up. It's most likely just me being daft, but I would love an explanation
For details see:https://gist.github.com/watson/f0e88a5ce591db8884dbe4b7ad447528 …
-
-
Spec implies it's a bug from what I can gather: https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout … "Schedules a timeout to compile and run code after timeout milliseconds." Don't think the word "after" could be interpreted any differently.
-
Thanks for looking it up. I thought I read that somewhere a long time ago which is also why I always assumed that it was a guarantee. So I'm mostly thinking this is down to me just measuring the diff wrong?! E.g off-by-one or something
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.