I'm trying to get the radius of a circle svg element but a error is coming in vs code:
actual code:
const circle = document.getElementById('progress_circle');
const radius = circle.r.baseVal.value;
error:
Property 'r' does not exist on type 'HTMLElement'.js(2339)
I'm using svelte, ts and vs code and I'm also a newbie in web dev.
Finally I got to a solution thanks to @aerial301
const circle = document.getElementById('progress_circle');
const radius = +circle.getAttribute('r');