run_tasks() — svelte Function Reference
Architecture documentation for the run_tasks() function in loop.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD 2b22712e_d460_adeb_1ed9_5597a50cfc51["run_tasks()"] 385470d9_b5f1_1cd1_d8da_e61454f3e60a["loop.js"] 2b22712e_d460_adeb_1ed9_5597a50cfc51 -->|defined in| 385470d9_b5f1_1cd1_d8da_e61454f3e60a 06e615dd_b546_019b_150f_91f3aec71a6b["now()"] 2b22712e_d460_adeb_1ed9_5597a50cfc51 -->|calls| 06e615dd_b546_019b_150f_91f3aec71a6b style 2b22712e_d460_adeb_1ed9_5597a50cfc51 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/src/internal/client/loop.js lines 9–24
function run_tasks() {
// use `raf.now()` instead of the `requestAnimationFrame` callback argument, because
// otherwise things can get wonky https://github.com/sveltejs/svelte/pull/14541
const now = raf.now();
raf.tasks.forEach((task) => {
if (!task.c(now)) {
raf.tasks.delete(task);
task.f();
}
});
if (raf.tasks.size !== 0) {
raf.tick(run_tasks);
}
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does run_tasks() do?
run_tasks() is a function in the svelte codebase, defined in packages/svelte/src/internal/client/loop.js.
Where is run_tasks() defined?
run_tasks() is defined in packages/svelte/src/internal/client/loop.js at line 9.
What does run_tasks() call?
run_tasks() calls 1 function(s): now.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free