Update article.md
The actual intended interval is 2 seconds not 5 seconds.
This commit is contained in:
parent
84fbfea996
commit
5deaa8ab2f
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ setTimeout(() => { clearInterval(timerId); alert('stop'); }, 5000);
|
||||||
```smart header="Time goes on while `alert` is shown"
|
```smart header="Time goes on while `alert` is shown"
|
||||||
In most browsers, including Chrome and Firefox the internal timer continues "ticking" while showing `alert/confirm/prompt`.
|
In most browsers, including Chrome and Firefox the internal timer continues "ticking" while showing `alert/confirm/prompt`.
|
||||||
|
|
||||||
So if you run the code above and don't dismiss the `alert` window for some time, then in the next `alert` will be shown immediately as you do it. The actual interval between alerts will be shorter than 5 seconds.
|
So if you run the code above and don't dismiss the `alert` window for some time, then in the next `alert` will be shown immediately as you do it. The actual interval between alerts will be shorter than 2 seconds.
|
||||||
```
|
```
|
||||||
|
|
||||||
## Recursive setTimeout
|
## Recursive setTimeout
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue