Both articles are correct. It is safe to assume that whenever you do something that may reasonably require that the sizes of the elements in the DOM are calculated, you will activate the payment.
In addition, as far as I can tell, both articles say the same thing.
The first article says that reflow occurs when:
When you retrieve a dimension that needs to be calculated , for example access to offsetWidth , clientHeight, or any computed CSS value (via getComputedStyle () in DOM-compatible browsers or currentStyle in IE), while DOM changes are queued so that they were made.
The second article says:
As mentioned earlier, the browser can cache several changes for you and swim only once when all these changes have been made. However, note that measuring the dimensions of an element will force it to pay so that the measurements are correct. Changes may or may not be explicitly repainted, but the reflex itself must still happen behind the scenes.
This effect is created when measurements are taken using properties such as offsetWidth , or using methods such as getComputedStyle . Even if the numbers are not used, just using any of them, while the browser is still caching the changes, will be enough to trigger a hidden recount. If these measurements are repeated repeatedly, you should consider them only once and save the result, which can then be used later.
I believe this means the same thing they said earlier. Opera will try its best to cache values and not overpay for you, but you should not rely on its ability to do this.
In all senses and purposes, simply believe what they both say when they say that all three types of interactions can cause payment.
Greetings.
coderjoe Aug 14 '09 at 14:33 2009-08-14 14:33
source share