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
Specifying the width/height of svg node in % makes them inaccessible through svg.width/height.baseVal.value, even tho using % is allowed, not sure why this is so?
Wrapping svg.width/height.baseVal.value in window.onload does not change anything. Only able to access width/height when svg.getClientRects() is invoked beforehand.
// svg is the svg DOM node
svg.getClientRects(); // Must be called
const svgWidth = svg.width.baseVal.value;
const svgHeight = svg.height.baseVal.value;
P.S. (In Chrome)
console.log(svg.width.baseVal); // Preview shows 0, when expanded shows the actual width
console.log(svg.height.baseVal.value); // Shows 0
The text was updated successfully, but these errors were encountered:
This is a browser bug, please report it at https://crbug.com/new - the bug-tracker for Chrome - since you mentioned it. If you see this bug elsewhere then please report it to them as well. Then close this issue.
Specifying the width/height of svg node in % makes them inaccessible through
svg.width/height.baseVal.value
, even tho using % is allowed, not sure why this is so?Wrapping
svg.width/height.baseVal.value
inwindow.onload
does not change anything. Only able to access width/height whensvg.getClientRects()
is invoked beforehand.P.S. (In Chrome)
The text was updated successfully, but these errors were encountered: