Re: [svgwg] New Interface SVGPathSegment: segments should be more editable (#974)

In the current implementation for SVG Path Data API in Firefox and the Polyfill API uses `SVGPathSegment` as a WebIDL `dictionary`:

```
dictionary SVGPathSegment {
  required DOMString type;
  required sequence<unrestricted float> values;
};
```

I believe a constructor is unnecessary:

- `[NoInterfaceObject]` is deprecated in WebIDL - `dictionary` is the natural replacement.
- POJO compat is essential. The [path-data-polyfill](https://github.com/jarek-foksa/path-data-polyfill) creates plain `{type, values}` objects; Firefox had to fix POJO rejection in Firefox 138 ([bug 1954044](https://bugzilla.mozilla.org/show_bug.cgi?id=1954044)). A dictionary accepts POJOs natively.
- No developer value. `{type: "M", values: [0, 0]}` is already idiomatic JS - a constructor adds ceremony without benefit.
- Forward-compatible. A constructor can be added later as a non-breaking change if demand emerges.

IMO, we should not resolve this as "no constructor for now."

-- 
GitHub Notification of comment by viralipurbey
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/974#issuecomment-4131955355 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 26 March 2026 06:09:11 UTC