Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. SVGAnimationElement

SVGAnimationElement

Baseline Widely available *

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨January 2020⁩.

* Some parts of this feature may have varying levels of support.

TheSVGAnimationElement interface is the base interface for all of the animation element interfaces:SVGAnimateElement,SVGSetElement,SVGAnimateColorElement,SVGAnimateMotionElement andSVGAnimateTransformElement.

EventTarget Node Element SVGElement SVGAnimationElement

Instance properties

This interface also inherits properties from its parent,SVGElement.

SVGAnimationElement.requiredExtensionsRead only

AnSVGStringList reflecting therequiredExtensions attribute of the given element.

SVGAnimationElement.systemLanguageRead only

AnSVGStringList reflecting thesystemLanguage attribute of the given element.

SVGAnimationElement.targetElementRead only

AnSVGElement representing the element which is being animated. If no target element is being animated (for example, because thehref specifies an unknown element) the value returned isnull.

Instance 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 aDOMException with codeINVALID_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 aDOMException with codeNOT_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 tobeginElementAt(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 toendElementAt(0).

SVGAnimationElement.endElementAt()

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

Events

Listen to these events usingaddEventListener() or by assigning an event listener to theon... handler property of this interface.

beginEvent

Fired when the element local timeline begins to play.

endEvent

Fired when at the active end of the animation is reached.

repeatEvent

Fired when the element's local timeline repeats. It will be fired each time the element repeats, after the first iteration.

Specifications

Specification
SVG Animations Level 2
# InterfaceSVGAnimationElement

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp