Closed biojet1 closed 3 years ago
In the object returned by Window.getComputedStyle its getPropertyValue method has a bug It puts the element in a closure variable node. When you update the variable, the value will remain. Try this.
Window.getComputedStyle
getPropertyValue
node
const style = window.getComputedStyle(element); style.getPropertyValue('fill'); style.getPropertyValue('fill'); // <-- TypeError: Cannot read property 'fill' of undefined
Because now the node variable is Document object with no style property
good catch!
In the object returned by
Window.getComputedStyle
itsgetPropertyValue
method has a bug It puts the element in a closure variablenode
. When you update the variable, the value will remain. Try this.Because now the
node
variable is Document object with no style property