#1292: Other Spec Review: SVG Path Data API: getPathData(), setPathData(), getPathSegmentAtLength()

Visit on Github

Opened Oct 19, 2026

Specification

https://w3c.github.io/svgwg/specs/paths/#InterfaceSVGPathData

Explainer

https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/SVG/SVGPathDataAPI/explainer.md

Links

The specification

Where and by whom is the work is being done?

Feedback so far

You should also know that...

There's discussion in the working group to extend these APIs to animated values:

https://github.com/w3c/svgwg/issues/1197

There's also discussion to further enhance getPathSegmentAtLength():

https://github.com/w3c/svgwg/issues/1186

<!-- Content below this is maintained by @w3c-tag-bot -->

Track conversations at https://tag-github-bot.w3.org/gh/w3ctag/design-reviews/1292

Discussions

Comment by @jyasskin Oct 22, 2026 (See Github)

The TAG as a whole hasn't discussed this, but I noticed the getPathSegmentAtLength() function in your Intent to Ship. Generally, "length" refers to the total length of the list, and we use ...At(...) for functions that index into the list. When we need a name for the index, it's "index", not "length". I see that this function isn't treating the path as an array of elements, so ...At(...) would probably be confusing, but I think AtLength() will also be confusing.

What about getPathSegmentAtDistance()?

Comment by @SteveBeckerMSFT Oct 22, 2026 (See Github)

Thanks for the review. I created an issue to discuss with the SVG working group.

The new function, getPathSegementAtLength(), is named similar to another existing function: getPointAtLength(). getPointAtLength() has been widely available for a long time.