3 ms·
I believe that getBoundingClientRect does not force a layout calculation by itself, it only forces queued recalculations to happen synchronously. So calling i
by afiori 5y ago
I believe that getBoundingClientRect does not force a layout calculation by itself, it only forces queued recalculations to happen synchronously.
So calling it 100 times in a loop should be fast, but calling it 100 times in a loot that also updates the DOM should be cripplingly slow.