You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consider renaming SVGPathElement::getPathSegmentAtLength() to getPathSegmentAtDistance() #1218
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()?
The current name, getPathSegmentAtLength(), is consistent with another method on the path element: getPointAtLength(). According to MDN, getPointAtLength() has been shipping in all browsers for a long time.
Activity
longsonr commentedon Oct 24, 2026
Currently mirrors the terminology of SVG 1.1 https://www.w3.org/TR/SVG11/paths.html#__svg__SVGPathElement__getPathSegAtLength
You can of course create an alias if you really must. https://searchfox.org/firefox-main/source/dom/webidl/SVGLengthList.webidl#16