I'm trying to get data from SVG path and until recently the console.log(document.getElementById("path1").animatedPathSegList); statement was working fine and returning the expected object. Suddenly the same statement is returning "undefined". I did change something in the code but not directly related to this statement, but I can't remember what the change was.
Before, I could easily find the animatedPathSegList object in the console using console.log(document.getElementById("path1")); but there's no list whatsoever to be found in both Firefox and Chrome. I'm totally lost here.
Thanks.
<svg
width="210mm"
height="297mm"
viewBox="0 0 210 297"
version="1.1"
id="svg5"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<path
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 80,10 50,50 33,44 60,60 140,125 110,80 H 144 V 95"
id="path1" />
</svg>
<script>
console.log(document.getElementById("path1"));
console.log(document.getElementById("path1").animatedPathSegList);//undefined
console.log(document.getElementById("path1").SVGPathSegList);//undefined
</script>