Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 75126 of SVGAnimationElement

  • Revision slug: DOM/SVGAnimationElement
  • Revision title: SVGAnimationElement
  • Revision id: 75126
  • Created:
  • Creator: Jeremie
  • Is current revision? No
  • Comment page created, 208 words added

Revision Content

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() }}

Revision Source

<h2 id="SVG_Animation_DOM_interface">SVG Animation DOM interface</h2>
<p>The <code>SVGAnimationElement</code> interface is the base interface for all of the animation element interfaces: {{ domxref("SVGAnimateElement") }}, {{ domxref("SVGSetElement") }}, {{ domxref("SVGAnimateColorElement") }}, {{ domxref("SVGAnimateMotionElement") }} and {{ domxref("SVGAnimateTransformElement") }}.</p>
<h3 id="Interface_overview">Interface overview</h3>
<table class="standard-table"> <tbody> <tr> <th scope="row">Also implement</th> <td>{{ domxref("SVGElement") }}, {{ domxref("SVGTests") }}, {{ domxref("SVGExternalResourcesRequired") }}, {{ domxref("ElementTimeControl") }}</td> </tr> <tr> <th scope="row">Methods</th> <td> <ul> <li><code>float getStartTime()</code></li> <li><code>float getCurrentTime()</code></li> <li><code>float getSimpleDuration()</code></li> </ul> </td> </tr> <tr> <th scope="row">Properties</th> <td> <ul> <li>readonly {{ domxref("SVGElement") }} <code>targetElement</code></li> </ul> </td> </tr> <tr> <th scope="row">Normative document</th> <td><a class="external" href="https://www.w3.org/TR/SVG11/animate.html#InterfaceSVGAnimationElement" title="https://www.w3.org/TR/SVG11/animate.html#InterfaceSVGAnimationElement">SVG 1.1 (2nd Edition)</a></td> </tr> </tbody>
</table>
<h2 id="Properties">Properties</h2>
<table class="standard-table"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>targetElement</code></td> <td>{{ domxref("SVGElement") }}</td> <td>The element which is being animated.</td> </tr> </tbody>
</table>
<h2 id="Methods">Methods</h2>
<table class="standard-table"> <thead> <tr> <th>Name &amp; Arguments</th> <th>Return</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code><strong>getStartTime</strong>()</code></td> <td>float</td> <td>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.</td> </tr> <tr> <td><code><strong>getCurrentTime</strong>()</code></td> <td>float</td> <td>Returns the current time in seconds relative to time zero for the given time container.</td> </tr> <tr> <td><code><strong>getSimpleDuration</strong>()</code></td> <td>float</td> <td>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.</td> </tr> </tbody>
</table>
<h2 id="Browser_compatibility" name="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
<table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Chrome</th> <th>Firefox (Gecko)</th> <th>Internet Explorer</th> <th>Opera</th> <th>Safari (WebKit)</th> </tr> <tr> <td>Basic support</td> <td>{{ CompatVersionUnknown() }}</td> <td>{{ CompatVersionUnknown() }}</td> <td>{{ CompatNo() }}</td> <td>{{ CompatVersionUnknown() }}</td> <td>{{ CompatVersionUnknown() }}</td> </tr> </tbody>
</table>
</div>
<div id="compat-mobile">
<table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Android</th> <th>Firefox Mobile (Gecko)</th> <th>IE Mobile</th> <th>Opera Mobile</th> <th>Safari Mobile</th> </tr> <tr> <td>Basic support</td> <td>{{ CompatNo() }}</td> <td>{{ CompatVersionUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatVersionUnknown() }}</td> <td>{{ CompatVersionUnknown() }}</td> </tr> </tbody>
</table>
</div>
Revert to this revision