Menu

Post image 1
Post image 2
1 / 2
0

Rendering Is a Browser Decision, Not a JavaScript One

DEV Community·Marsha Teo·about 1 month ago
#iKUPwG9w
Reading 0:00
15s threshold

This is the fifth article in a series on how JavaScript actually runs. You can read the full series here or on my website . You change the DOM. You expect the screen to update. It doesn’t. Why? In the earlier articles, we established three constraints: JavaScript runs to completion. Tasks form scheduling boundaries. Microtasks must fully drain before moving on. Now we add a fourth: The browser will not render while a macrotask is running nor while microtasks are draining. Rendering Is a Browser Decision Up to this point in the series, we’ve focused on two pieces of the system: The JavaScript engine, which executes code and manages the call stack. The runtime, which provides the event loop and scheduling rules. But neither of these is responsible for rendering. Beyond the JavaScript engine and the runtime, the browser also contains a rendering engine — the subsystem responsible for layout and painting. The engine executes your code. The runtime manages when that code runs.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More