From 1eb7125ec66e0b455671b8aa24cd73dc91d43756 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Fri, 21 May 2021 10:42:11 +0200 Subject: [PATCH] Fold SVGAnimatedPoints (a mixin) into SVGPolygonElement and SVGPolylineElement Redirect it to SVGPolygonElement, an arbitrary choice between the two. Document animatedPoints in a similar way to animVal here: https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimatedString This ignores that the spec requires animatedPoints to be an alias of points, because that does not match what's actually implemented (yet): https://svgwg.org/svg2-draft/shapes.html#__svg__SVGAnimatedPoints__animatedPoints https://wpt.fyi/results/svg/shapes/animatedPoints-non-animated.html?run_id=5709221590990848&run_id=5697986191425536&run_id=5747784122630144&run_id=5742635329257472 --- files/en-us/_redirects.txt | 5 +- files/en-us/_wikihistory.json | 10 --- .../web/api/svganimatedpoints/index.html | 78 ------------------- .../web/api/svgpolygonelement/index.html | 9 ++- .../web/api/svgpolylineelement/index.html | 9 ++- 5 files changed, 19 insertions(+), 92 deletions(-) delete mode 100644 files/en-us/web/api/svganimatedpoints/index.html diff --git a/files/en-us/_redirects.txt b/files/en-us/_redirects.txt index 6c1e926206ee829..71773c3e7b72e96 100644 --- a/files/en-us/_redirects.txt +++ b/files/en-us/_redirects.txt @@ -1648,7 +1648,7 @@ /en-US/docs/DOM/SVGAnimatedLengthList /en-US/docs/Web/API/SVGAnimatedLengthList /en-US/docs/DOM/SVGAnimatedNumber /en-US/docs/Web/API/SVGAnimatedNumber /en-US/docs/DOM/SVGAnimatedNumberList /en-US/docs/Web/API/SVGAnimatedNumberList -/en-US/docs/DOM/SVGAnimatedPoints /en-US/docs/Web/API/SVGAnimatedPoints +/en-US/docs/DOM/SVGAnimatedPoints /en-US/docs/Web/API/SVGPolygonElement /en-US/docs/DOM/SVGAnimatedPreserveAspectRatio /en-US/docs/Web/API/SVGAnimatedPreserveAspectRatio /en-US/docs/DOM/SVGAnimatedRect /en-US/docs/Web/API/SVGAnimatedRect /en-US/docs/DOM/SVGAnimatedString /en-US/docs/Web/API/SVGAnimatedString @@ -3020,7 +3020,7 @@ /en-US/docs/Document_Object_Model_(DOM)/SVGAnimatedLengthList /en-US/docs/Web/API/SVGAnimatedLengthList /en-US/docs/Document_Object_Model_(DOM)/SVGAnimatedNumber /en-US/docs/Web/API/SVGAnimatedNumber /en-US/docs/Document_Object_Model_(DOM)/SVGAnimatedNumberList /en-US/docs/Web/API/SVGAnimatedNumberList -/en-US/docs/Document_Object_Model_(DOM)/SVGAnimatedPoints /en-US/docs/Web/API/SVGAnimatedPoints +/en-US/docs/Document_Object_Model_(DOM)/SVGAnimatedPoints /en-US/docs/Web/API/SVGPolygonElement /en-US/docs/Document_Object_Model_(DOM)/SVGAnimatedPreserveAspectRatio /en-US/docs/Web/API/SVGAnimatedPreserveAspectRatio /en-US/docs/Document_Object_Model_(DOM)/SVGAnimatedRect /en-US/docs/Web/API/SVGAnimatedRect /en-US/docs/Document_Object_Model_(DOM)/SVGAnimatedString /en-US/docs/Web/API/SVGAnimatedString @@ -8441,6 +8441,7 @@ /en-US/docs/Web/API/RotationRate.beta /en-US/docs/Web/API/DeviceMotionEvent/rotationRate /en-US/docs/Web/API/RotationRate.gamma /en-US/docs/Web/API/DeviceMotionEvent/rotationRate /en-US/docs/Web/API/SVGAElement/SVGAlement.target /en-US/docs/Web/API/SVGAElement/target +/en-US/docs/Web/API/SVGAnimatedPoints /en-US/docs/Web/API/SVGPolygonElement /en-US/docs/Web/API/SVGElement/dataset /en-US/docs/Web/API/HTMLOrForeignElement/dataset /en-US/docs/Web/API/SVGElement/onabort /en-US/docs/Web/API/GlobalEventHandlers/onabort /en-US/docs/Web/API/SVGElement/onblur /en-US/docs/Web/API/GlobalEventHandlers/onblur diff --git a/files/en-us/_wikihistory.json b/files/en-us/_wikihistory.json index 259fdba80375ac4..b76427de4b5d78d 100644 --- a/files/en-us/_wikihistory.json +++ b/files/en-us/_wikihistory.json @@ -76404,16 +76404,6 @@ "Jeremie" ] }, - "Web/API/SVGAnimatedPoints": { - "modified": "2020-10-15T21:10:58.964Z", - "contributors": [ - "fscholz", - "abbycar", - "kscarfone", - "Sheppy", - "Jeremie" - ] - }, "Web/API/SVGAnimatedPreserveAspectRatio": { "modified": "2020-10-15T21:09:36.896Z", "contributors": [ diff --git a/files/en-us/web/api/svganimatedpoints/index.html b/files/en-us/web/api/svganimatedpoints/index.html deleted file mode 100644 index 988ceffddb213fc..000000000000000 --- a/files/en-us/web/api/svganimatedpoints/index.html +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: SVGAnimatedPoints -slug: Web/API/SVGAnimatedPoints -tags: - - API - - NeedsExample - - Reference - - SVG - - SVG DOM -browser-compat: api.SVGAnimatedPoints ---- -
{{APIRef("SVG")}}
- -

SVG animated points interface

- -

The SVGAnimatedPoints interface supports elements which have a {{ SVGAttr("points") }} attribute which holds a list of coordinate values and which support the ability to animate that attribute.

- -

Additionally, the {{ SVGAttr("points") }} attribute on the original element accessed via the XML DOM (e.g., using the getAttribute() method call) will reflect any changes made to the SVGAnimatedPoints.points attribute.

- -

Interface overview

- - - - - - - - - - - - - - - - - - - - -
Also implementNone
MethodsNone
Properties -
    -
  • readonly {{ domxref("SVGPointList") }} points
  • -
  • readonly {{ domxref("SVGPointList") }} animatedPoints
  • -
-
Normative documentSVG 1.1 (2nd Edition)
- -

Properties

- - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
points{{ domxref("SVGPointList") }}Provides access to the base (i.e., static) contents of the {{ SVGAttr("points") }} attribute.
animatedPoints{{ domxref("SVGPointList") }}Provides access to the current animated contents of the {{ SVGAttr("points") }} attribute. If the given attribute or property is being animated, contains the current animated value of the attribute or property. If the given attribute or property is not currently being animated, contains the same value as points.
- -

Methods

- -

The SVGAnimatedPoints interface do not provide any specific methods.

- -

Browser compatibility

- -

{{Compat}}

diff --git a/files/en-us/web/api/svgpolygonelement/index.html b/files/en-us/web/api/svgpolygonelement/index.html index 1d6eb1e175843b7..b7ded0972a09097 100644 --- a/files/en-us/web/api/svgpolygonelement/index.html +++ b/files/en-us/web/api/svgpolygonelement/index.html @@ -17,7 +17,14 @@

Properties

-

This interface doesn't implement any specific properties, but inherits properties from its parent, {{domxref("SVGGeometryElement")}} and also implements properties from {{domxref("SVGAnimatedPoints")}}.

+

This interface also inherits properties from its parent, {{domxref("SVGGeometryElement")}}.

+ +
+
{{domxref("SVGPolygonElement.animatedPoints")}} {{readOnlyInline}}
+
A {{DOMxRef("SVGPointList")}} representing the animated value of the element's {{SVGAttr("points")}} attribute. If the {{SVGAttr("points")}} attribute is not being animated, it contains the same value as the points property.
+
{{domxref("SVGPolygonElement.points")}}
+
A {{DOMxRef("SVGPointList")}} representing the base (i.e., static) value of the element's {{SVGAttr("points")}} attribute. Modifications via the {{DOMxRef("SVGPointList")} object are reflected in the {{SVGAttr("points")}} attribute, and vice versa.
+

Methods

diff --git a/files/en-us/web/api/svgpolylineelement/index.html b/files/en-us/web/api/svgpolylineelement/index.html index 90a44a9cacc1477..d3c6204df13c79b 100644 --- a/files/en-us/web/api/svgpolylineelement/index.html +++ b/files/en-us/web/api/svgpolylineelement/index.html @@ -17,7 +17,14 @@

Properties

-

This interface doesn't implement any specific properties, but inherits properties from its parent, {{domxref("SVGGeometryElement")}} and also implements properties from {{domxref("SVGAnimatedPoints")}}.

+

This interface also inherits properties from its parent, {{domxref("SVGGeometryElement")}}.

+ +
+
{{domxref("SVGPolylineElement.animatedPoints")}} {{readOnlyInline}}
+
A {{DOMxRef("SVGPointList")}} representing the animated value of the element's {{SVGAttr("points")}} attribute. If the {{SVGAttr("points")}} attribute is not being animated, it contains the same value as the points property.
+
{{domxref("SVGPolylineElement.points")}}
+
A {{DOMxRef("SVGPointList")}} representing the base (i.e., static) value of the element's {{SVGAttr("points")}} attribute. Modifications via the {{DOMxRef("SVGPointList")} object are reflected in the {{SVGAttr("points")}} attribute, and vice versa.
+

Methods