Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Scheduling: setTimeout and setInterval#3423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
bogdanbacosca wants to merge7 commits intojavascript-tutorial:master
base:master
Choose a base branch
Loading
frombogdanbacosca:timeout

Conversation

bogdanbacosca
Copy link
Contributor

lines 101, 211, 259, 261, 280, 282 and 284 - improvement suggestions
line 130 - grammar fix

joaquinelio reacted with thumbs up emoji
@@ -127,7 +127,7 @@ setTimeout(() => { clearInterval(timerId); alert('stop'); }, 5000);
```

```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`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

IMO should have both:

In most browsers, including Chrome and Firefox, the internal timer continues "ticking" while showingalert/confirm/prompt.

@@ -208,7 +208,7 @@ Did you notice?

That's normal, because the time taken by `func`'s execution "consumes" a part of the interval.

It is possible that `func`'s executionturns outto be longer than we expected andtakes more than 100ms.
It is possible that `func`'s execution to be longer than we expected andtake more than 100ms.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

disagree, leave as original

@@ -256,9 +256,9 @@ The first line "puts the call into calendar after 0ms". But the scheduler will o
There are also advanced browser-related use cases of zero-delay timeout, that we'll discuss in the chapter <info:event-loop>.

````smart header="Zero delay is in fact not zero (in a browser)"
In the browser, there's a limitationof how often nested timers can run. The [HTML Living Standard](https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers) says: "after five nested timers, the interval is forced to be at least 4 milliseconds.".
In the browser, there's a limitationfor how often nested timers can run. The [HTML Living Standard](https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers) says: "after five nested timers, the interval is forced to be at least 4 milliseconds.".
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

disagree

@javascript-translate-botjavascript-translate-bot added the changes requestedWaiting for changes and /done from PR author labelAug 24, 2024
@javascript-translate-bot

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@shallow-beachshallow-beachshallow-beach requested changes

Assignees
No one assigned
Labels
changes requestedWaiting for changes and /done from PR author
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@bogdanbacosca@javascript-translate-bot@shallow-beach

[8]ページ先頭

©2009-2025 Movatter.jp