forced synchronous layout

When JavaScript reads a geometry value such as offsetHeight after changing styles, making the browser run layout immediately to give an up-to-date answer.

In more detail

Normally the browser delays layout and does it once before the next frame. Reading geometry after a write forces it to happen right away, and doing that repeatedly in a loop becomes layout thrashing.

Related terms

Taught in

References