You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it even that expensive to call getComputedStyle? (For instance, does the browser already have all these CSSStyleDeclaration objects sitting there, making getComputedStyle basically just a property accessor?)
Does it become expensive to hold onto a bunch of "live" CSSStyleDeclaration objects? (For instance, if the object doesn't exist before calling getComputedStyle, and updates values whether or not we check them, does it end up being worse for performance?)
The text was updated successfully, but these errors were encountered:
#10 switched us from using getBoundingClientRect to getComputedStyle.
However, there's a possibility that this will actually result in incorrect values, so we may want to look into using clientWidth and clientHeight instead.
It looks like
getComputedStyle
returns a "live"CSSStyleDeclaration
that automatically updates its properties.It'd be nice to check out how we could use this to our advantage for performance, or whether it might be unnecessary or even bad to do so.
To Do:
CSSStyleDeclaration
?getComputedStyle
? (For instance, does the browser already have all theseCSSStyleDeclaration
objects sitting there, makinggetComputedStyle
basically just a property accessor?)CSSStyleDeclaration
objects? (For instance, if the object doesn't exist before callinggetComputedStyle
, and updates values whether or not we check them, does it end up being worse for performance?)The text was updated successfully, but these errors were encountered: