You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
None of Chrome, Firefox or Safari match the timer initialization steps. In particular, the amount of nesting that is required before the timeout is clamped to 4ms differs.
Which means that by the spec, the output should be approximately:
START
0
0
0
0
0
0
4
...
...
with six 0's before the first 4.
However, both Firefox and Chrome print only four 0's before the first 4. And I think Safari prints five 0's.
So step 5 of the spec doesn't match what implementations are actually doing.
The text was updated successfully, but these errors were encountered:
majaha
changed the title
setTimeout() implementations do not match specification
setTimeout() nesting levels: browsers do not match specification
Jun 2, 2024
What is the issue with the HTML Standard?
None of Chrome, Firefox or Safari match the timer initialization steps. In particular, the amount of nesting that is required before the timeout is clamped to 4ms differs.
The issue is demonstrated with this code:
By a close reading of the spec, you can trace the execution like this:
Which means that by the spec, the output should be approximately:
with six 0's before the first 4.
However, both Firefox and Chrome print only four 0's before the first 4. And I think Safari prints five 0's.
So step 5 of the spec doesn't match what implementations are actually doing.
The text was updated successfully, but these errors were encountered: