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:
It looks like
getComputedStylereturns a "live"CSSStyleDeclarationthat 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 theseCSSStyleDeclarationobjects sitting there, makinggetComputedStylebasically just a property accessor?)CSSStyleDeclarationobjects? (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?)