closes #990
This commit is contained in:
parent
55f599ed28
commit
da3ba6a072
1 changed files with 3 additions and 3 deletions
|
@ -127,10 +127,10 @@ let timerId = setInterval(() => alert('tick'), 2000);
|
|||
setTimeout(() => { clearInterval(timerId); alert('stop'); }, 5000);
|
||||
```
|
||||
|
||||
```smart header="Modal windows freeze time in Chrome/Opera/Safari"
|
||||
In browsers IE and Firefox the internal timer continues "ticking" while showing `alert/confirm/prompt`, but in Chrome, Opera and Safari the internal timer becomes "frozen".
|
||||
```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`.
|
||||
|
||||
So if you run the code above and don't dismiss the `alert` window for some time, then in Firefox/IE next `alert` will be shown immediately as you do it (2 seconds passed from the previous invocation), and in Chrome/Opera/Safari -- after 2 more seconds (timer did not tick during the `alert`).
|
||||
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. So the actual interval between alerts will be shorter than 5 seconds.
|
||||
```
|
||||
|
||||
## Recursive setTimeout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue