SVG Animation DOM interface
The SVGAnimationElement
interface is the base interface for all of the animation element interfaces: {{ domxref("SVGAnimateElement") }}, {{ domxref("SVGSetElement") }}, {{ domxref("SVGAnimateColorElement") }}, {{ domxref("SVGAnimateMotionElement") }} and {{ domxref("SVGAnimateTransformElement") }}.
Interface overview
Also implement | {{ domxref("SVGElement") }}, {{ domxref("SVGTests") }}, {{ domxref("SVGExternalResourcesRequired") }}, {{ domxref("ElementTimeControl") }} |
Methods | float getStartTime() float getCurrentTime() float getSimpleDuration() |
Properties | - readonly {{ domxref("SVGElement") }}
targetElement |
Normative document | SVG 1.1 (2nd Edition) |
Properties
Name | Type | Description |
targetElement | {{ domxref("SVGElement") }} | The element which is being animated. |
Methods
Name & Arguments | Return | Description |
getStartTime() | float | Returns the begin time, in seconds, for this animation element's current interval, if it exists, regardless of whether the interval has begun yet. If there is no current interval, then a {{ domxref("DOMException") }} with code INVALID_STATE_ERR is thrown. |
getCurrentTime() | float | Returns the current time in seconds relative to time zero for the given time container. |
getSimpleDuration() | float | Returns the number of seconds for the simple duration for this animation. If the simple duration is undefined (e.g., the end time is indefinite), then a {{ domxref("DOMException") }} with code NOT_SUPPORTED_ERR is raised. |
Browser compatibility
{{ CompatibilityTable() }}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
Basic support | {{ CompatVersionUnknown() }} | {{ CompatVersionUnknown() }} | {{ CompatNo() }} | {{ CompatVersionUnknown() }} | {{ CompatVersionUnknown() }} |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
Basic support | {{ CompatNo() }} | {{ CompatVersionUnknown() }} | {{ CompatUnknown() }} | {{ CompatVersionUnknown() }} | {{ CompatVersionUnknown() }} |