MicrosoftEdge / MicrosoftEdge/MSEdgeExplainers

[SVGPathDataAPI] Tracking issue for SVG Path Data API explainer

Open
#1,289 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
1.4k
Forks
286
Avg merge
3d 1h
Merged PRs (30d)
8

Description

Summary

Explainer for adding getPathData(), setPathData(), and getPathSegmentAtLength() to SVGPathElement in Chromium.

Explainer: SVG/SVGPathDataAPI/explainer.md

Problem

Chrome removed the old SVGPathSegList API in Chrome 48 (2015). The SVG WG specified a simpler replacement in the SVG Paths spec, but it was never implemented — leaving Chrome with no native segment-level path access for 10+ years. Developers must use polyfills or manual string parsing.

Proposed API

  • getPathData(settings) — returns path segments as {type, values} plain objects
  • setPathData(pathData) — sets path from an array of {type, values} objects
  • getPathSegmentAtLength(distance) — returns the segment at a given path length

Supports normalization ({normalize: true}) to reduce all commands to M, L, C, Z.

Status

  • Firefox: Shipped in v137 (Jan 2025)
  • Safari: Not yet (still ships old SVGPathSegList)
  • Chrome: Not yet — this explainer proposes implementation

Related links

Please file feedback on this issue. See the explainer for full details.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with SVG/SVGPathDataAPI/explainer.md and the linked Chromium bug 40441025; compare the proposed methods with SVG Paths §7 DOM Interfaces and the referenced Firefox implementation. This tracking issue names no implementation file or test, so an agreed Chromium scope and entry point would be needed before defining done.

Written by the indexing model from the issue text.

Assessment

Domain
api, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.