[svgwg] `points` and `animatedPoints` of `SVGPolylineElement` and `SVGPolygonElement` are inconsistent with the rest of SVG shapes (#990)

shallawa has just created a new issue for https://github.com/w3c/svgwg:

== `points` and `animatedPoints` of `SVGPolylineElement` and `SVGPolygonElement` are inconsistent with the rest of SVG shapes ==
I think `SVGPolylineElement` and `SVGPolygonElement` have weird and inconsistent interfaces compared to the rest of the SVG elements. These two elements have the `baseVal` and `animVal` of the points flattened to two members `points` and `animatedPoints`.  But `SVGTextPositioningElement`, for example, has a the proper interface. It has its members represented as `SVGAnimatedLengthList`
```
interface SVGTextPositioningElement : SVGTextContentElement {
    readonly attribute SVGAnimatedLengthList x;
    ... 
};
```
It does not have `x` and `animatedX` of type `SVGLengthList`. It just has `x` of type `SVGAnimatedLengthList`.

So to access the `baseVal` or `animVal` `SVGLengthList` of a text element, you would say `text.x.baseVal` or `text.x.animVal`.

It would have made things much simpler and clearer if `SVGPolylineElement` was defined like this:
```
interface SVGPolylineElement : SVGGeometryElement {
    readonly attribute SVGAnimatedPointList points;
};
```
And instead of accessing the current `points` and `animatedPoints` we would have accessed `polyline.points.baseVal` and `polyline.points.animVal`

Please view or discuss this issue at https://github.com/w3c/svgwg/issues/990 using your GitHub account


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

Received on Monday, 28 July 2025 16:47:53 UTC