← Chrome 160 reference · All APIs

v160 · svg · covered on mdn

SVG Path Data API

Adds structured JavaScript access to SVG <path> geometry via three methods on SVGPathElement (SVGPathData mixin): getPathData() reads the base d attribute as an array of { type, values } segment objects (with optional { normalize: true } reducing commands to absolute M, L, C, and Z), setPathData() writes a segment array back to d, and getPathSegmentAtLength() returns the segment at a given distance along the path.

Limited availability — shipped in Firefox 137 and Chrome 160; Safari has not signaled implementation

  • Chrome · 160 (desktop, Android, WebView)
  • Edge · Mirrors Chromium (160)
  • Firefox · 137 (shipped April 2025)
  • Safari · No signal yet

No dedicated web-features entry exists on webstatus.dev for the SVG Path Data API (checked 2026-11-24). BCD api/SVGPathElement.json records Firefox 137 for getPathData, setPathData, and getPathSegmentAtLength, and has not yet been updated from false for Chrome 160.

this feature is documented on MDN

MDN: SVGPathElement: getPathData() method

MDN publishes complete, dedicated reference pages for all three SVGPathData methods (verified HTTP 200 on 2026-11-24, each with Syntax, Parameters, Return value, Examples, Specifications, and Browser compatibility). gendn does not duplicate MDN’s reference prose here.

Why gendn doesn’t duplicate MDN: this site exists for Chrome features without a canonical MDN page yet. When MDN already documents an API completely, gendn publishes an honest pointer alongside the Chrome 160 implementation nuances and live showcase embed MDN does not track.

what Chrome 160 actually does

In Blink’s svg_path_element.cc and svg_path_data.idl (verified against the svg/path/interfaces WPT suite):

if ("getPathData" in SVGPathElement.prototype) {
  const path = document.querySelector("svg path");
  const normalized = path.getPathData({ normalize: true }); // M, L, C, Z only
  const atMidpoint = path.getPathSegmentAtLength(path.getTotalLength() / 2);

  // Translate every absolute M/L/C coordinate by +10px on X
  const shifted = normalized.map(({ type, values }) => ({
    type,
    values: values.map((v, i) => (i % 2 === 0 ? v + 10 : v)),
  }));
  path.setPathData(shifted);
  console.log({ segmentCount: shifted.length, atMidpoint });
}
Source: Blink svg_path_element.cc; WPT setPathData-malformed.html; WPT getPathSegmentAtLength-clamping.html.

live example

Live interactive example from the Chrome Platform Showcase — SVG Path Data API (sibling demos: point editor, path morph, segment at length, validation & base value). Source: chrome-platform-showcase.

Browser compatibility

Support from BCD api/SVGPathElement.json (checked 2026-11-24) and ChromeStatus 4787972240179200. Disclosed BCD lag: getPathData, setPathData, and getPathSegmentAtLength still read Chrome false in BCD even though Chrome 160 ships all three methods.
BrowsergetPathData() / setPathData() / getPathSegmentAtLength()Evidence / notes
Chrome (desktop, Android, WebView)160 (BCD lags as false)Enabled by default in Chrome 160 per ChromeStatus API record (SVGPathDataAPI Blink runtime feature)
Edge160 (mirror)Chromium-based; Microsoft authored the Blink implementation, MSEdge explainer, and Interop 2027 proposal (#1469)
Firefox137Shipped April 2025 (Mozilla Bug 1934525; confirmed in BCD)
SafariNo releaseWebKit standards-positions#731 (No signal yet; false in BCD)
Source: BCD api/SVGPathElement.json; ChromeStatus API record (4787972240179200); Bugzilla 1934525.

quick reference

Chrome 160 shipping metadata and Blink IDL summary for SVG Path Data API
IDLSVGPathDataSettings { boolean normalize = false; } · SVGPathSegment { required DOMString type; required sequence<unrestricted float> values; } · SVGPathData mixin (getPathData(), setPathData(), getPathSegmentAtLength()) included on SVGPathElement (Blink svg_path_data.idl)
Shipped inChrome 160 (desktop, Android, Android WebView), enabled by default — filed under “Enabled by default” in the milestone=160 listing (feature type: “Chromium catches up”)
Runtime flagBlink runtime feature SVGPathDataAPI in runtime_enabled_features.json5
Intent & bugblink-dev Intent to Ship · Intent to Prototype · issues.chromium.org/40441025
TAG revieww3ctag/design-reviews#1292 (Pending)
Web platform testswpt.fyi — svg/path/interfaces
ChromeStatus4787972240179200 — SVG Path Data API

references