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
A typical use case of debouncing is when synchronizing with another constantly-updating state. Consider a function `onScrolled`, which listens for the [`scroll`](/en-US/docs/Web/API/Document/scroll_event) event. The `scroll` event may fire as often as every pixel scrolled, so the function will be called in very short intervals. If `onScrolled` is computationally expensive, earlier invocations might block later invocations from happening on time, or block other things from executing in the meantime, leading to a noticeable {{glossary("jank")}}. In this case, we can throttle `onScrolled`, such that it can only be called at most once every 10 milliseconds:
Josh-Cena
added
good first issue
A good issue for newcomers to get started with.
and removed
needs triage
Triage needed by staff and/or partners. Automatically applied when an issue is opened.
labels
Sep 13, 2024
MDN URL
https://developer.mozilla.org/en-US/docs/Glossary/Throttle
What specific section or headline is this issue about?
line 13 of the files/en-us/glossary/throttle/index.md file
What information was incorrect, unhelpful, or incomplete?
i suppose first occurrence of "debouncing" is incorrect
What did you expect to see?
expected to see "throttling" instead
Do you have any supporting links, references, or citations?
content/files/en-us/glossary/throttle/index.md
Line 13 in 3fdf7ec
Do you have anything more you want to share?
No response
MDN metadata
Page report details
en-us/glossary/throttle
The text was updated successfully, but these errors were encountered: