W3cubDocs

/DOM

SVGAnimationElement

The SVGAnimationElement interface is the base interface for all of the animation element interfaces: SVGAnimateElement, SVGSetElement, SVGAnimateColorElement, SVGAnimateMotionElement and SVGAnimateTransformElement.

Properties

This interface also inherits properties from its parent, SVGElement.

SVGAnimationElement.targetElement Read only
An SVGElement representing the element which is being animated. If no target element is being animated (for example, because the href specifies an unknown element) the value returned is null.
SVGAnimationElement.onbegin

The event handler for the beginEvent event .

SVGAnimationElement.onend
The event handler for the endEvent event .
SVGAnimationElement.onrepeat
The event handler for the repeatEvent event .

Methods

This interface also inherits methods from its parent, SVGElement.

SVGAnimationElement.getStartTime()
Returns a float representing 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 DOMException with code INVALID_STATE_ERR is thrown.
SVGAnimationElement.getCurrentTime()
Returns a float representing the current time in seconds relative to time zero for the given time container.
SVGAnimationElement.getSimpleDuration()
Returns a float representing 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 DOMException with code NOT_SUPPORTED_ERR is raised.
SVGAnimationElement.beginElement()
Creates a begin instance time for the current time. The new instance time is added to the begin instance times list. The behavior of this method is equivalent to beginElementAt(0).
SVGAnimationElement.beginElementAt()

Creates a begin instance time for the current time plus the specified offset. The new instance time is added to the begin instance times list.

SVGAnimationElement.endElement()

Creates an end instance time for the current time. The new instance time is added to the end instance times list. The behavior of this method is equivalent to endElementAt(0).

SVGAnimationElement.endElementAt()

Creates a end instance time for the current time plus the specified offset. The new instance time is added to the end instance times list.

Specifications

Browser compatibilityUpdate compatibility data on GitHub

Desktop
Chrome Edge Firefox Internet Explorer Opera Safari
Basic support Yes No Yes No Yes Yes
onbegin Yes No Yes No Yes Yes
onend Yes No Yes No Yes Yes
onrepeat Yes No Yes No Yes No
targetElement Yes No Yes No Yes Yes
Mobile
Android webview Chrome for Android Edge Mobile Firefox for Android Opera for Android iOS Safari Samsung Internet
Basic support ? No No Yes Yes Yes ?
onbegin ? ? No ? ? ? ?
onend ? ? No ? ? ? ?
onrepeat ? ? No ? ? ? ?
targetElement ? ? No ? ? ? ?

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimationElement