Web APIs
HTML event loop task
Host unit of work processed by an HTML event loop. Task sources associate tasks with queues; task selection is not one universal FIFO across all sources. Multi-file example: save each listed file separately, then serve the entry over local HTTP in a browser. See the packaged fixture for the original files.
Formal Syntax & Structure
javascript syntaxjavascript
setTimeout(callback, 0);Working Example
Example Snippetjavascript
// File: index.html<!doctype html><meta charset="utf-8"><title>Tasks</title><script>setTimeout(()=>console.log("timer"),0);Promise.resolve().then(()=>console.log("reaction"));console.log("script");</script>