element's box is (re)computed in the so-called "Update Layout" phase, which is currently specified* to occur (at least) in the next "Update Rendering" event loop step, in substep 14:
But it can also be enforced synchronously when calling some getters.
*While this is a recent addition to the specification, not all browsers strictly adhere to it, for example, I know from experience that Safari does not wait for the next "paint frame" to perform this layout update , but just some free time.
The
element's box is (re)computed in the so-called "Update Layout" phase, which is currently specified* to occur (at least) in the next "Update Rendering" event loop step, in substep 14:
But it can also be enforced synchronously when calling some getters.
*While this is a recent addition to the specification, not all browsers strictly adhere to it, for example, I know from experience that Safari does not wait for the next "paint frame" to perform this layout update , but just some free time.