JSFiddle - React, Tailwind, and code Playground

HTML

<svg xmlns="http://www.w3.org/2000/svg">
    <path/>
</svg>

JavaScript

try {
    var pt = document.querySelector("path").getPointAtLength(0)
    document.body.innerHTML += "<br/>getPointAtLength: " + pt + ": (" + pt.x + ", " + pt.y + ")";
} catch (ex) {
    document.body.innerHTML += "<br/>getPointAtLength exception: " + ex;
}
try {
    document.body.innerHTML += "<br/>getPathSegAtLength: " + document.querySelector("path").getPathSegAtLength(0);
} catch (ex) {
    document.body.innerHTML += "<br/>getPathSegAtLength exception: " + ex;
}