Skip to content

Consider renaming SVGPathElement::getPathSegmentAtLength() to getPathSegmentAtDistance() #1218

Open

Description

@SteveBeckerMSFT

Some initial feedback from part of the W3C TAG on getPathSegementAtLength():

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

  1. longsonr commented on Oct 24, 2026

    @longsonr
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions