WPT details: https://wpt.fyi/results/svg/path/interfaces?label=experimental&label=master&aligned
Adds structured JavaScript access to SVG path data through three methods on SVGPathElement: getPathData() reads the path as an array of {type, values} objects containing each segment's command and numeric parameters. setPathData() updates the path from such an array, getPathSegmentAtLength() returns the segment at a specified distance along the path. These methods let developers inspect, edit, and construct paths without manually parsing or serializing the d attribute. The optional getPathData({normalize: true}) setting simplifies path data to absolute move, line, cubic Bézier, and close commands (M, L, C, and Z). All three APIs operate on the base value of the d attribute, not CSS-computed or animated values.
In Chromium, inspecting or modifying individual SVG path segments requires parsing and serializing the d attribute string, often using third-party libraries. This makes tasks such as path animation, hit-testing, and programmatic path construction unnecessarily complex and error-prone. The previous SVGPathSegList API was removed in Chromium 48 because of its complex live mutation model, numerous factory methods, and underspecified edge cases. Developers have since relied on polyfills to restore structured access. Implementing the SVG Working Group’s replacement API provides a simpler, standardized way to read and modify path segments without custom string parsing or polyfills.
Docs: https://docs.google.com/document/d/1uCVUqYGKgsCCu7LEtEdO3Yuea-MT-I2XsU6Eoe3mlQI/edit?usp=sharing
Explainers: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/SVG/SVGPathDataAPI/explainer.md