Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardCSSreflow paint composite pipelineSingle-choice MCQ

A script reads `el.offsetHeight`, then sets `el.style.width = '200px'`, then reads `el.offsetTop`, then sets `el.style.height = '100px'`, then reads `el.clientWidth`. The element is in a normal in-flow document with no layout containment. How many synchronous (forced) layout passes does this code provoke in the worst case in a modern engine like Blink?

el.offsetHeight; el.style.width = '200px'; el.offsetTop; el.style.height = '100px'; el.clientWidth;