✅ – Liil' Boo – 16-51 Oct 4

Hey, Context & Tech : Working with CSS animations Challenge : retrieve an element's css property values , here : animation . Found so far : https://developer.mozilla.org/fr/docs/Web/API/Window/getComputedStyle Is there another way to access an element's css properties in using Javascript ? Also is window.getComputedStyle() "expensive" memory/speed wise ?
UU
Unknown User562d ago
LB
Liil' Boo561d ago
Thanks, I had thought of a workaround (with lesser DX/Developer Experience); it was manually giving a data-attribute that corresponds a value, which necessitate to remember the values and do the check with element.getAttribute But element.style.<property> is outright easier meaning getComputedStyle is deprecated ? Looks overkill anyway thank you
UU
Unknown User561d ago