I was developing a dropdown and used some code below to find the height the dropdown should be, since it wasn't fixed.
div.style.display = "block";
let height = div.offsetHeight;
div.style.display = "none";
On my screen, I don't see the div blink from a display block to a display none, which is intended, but why? Is it because the frames of the browser is limited and the transition from 'block' to 'none' is too fast? Should I be worried the frames on another device will be too slow and will present the div for a frame or two (say the computer was slow and took more time to retrieve offsetHeight)?