Layout thrashing
Alternating DOM reads and writes so the browser must recalculate layout synchronously each time.
Reading offsetHeight right after changing a width, inside a loop, forces a reflow on every iteration.
Alternating DOM reads and writes so the browser must recalculate layout synchronously each time.
Reading offsetHeight right after changing a width, inside a loop, forces a reflow on every iteration.
One of 266 cards in the Design deck. Browse every card.