Class SVGAnimationElement
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The SVGAnimationElement interface is the base interface for all of the animation element interfaces: SVGAnimateElement, SVGSetElement, SVGAnimateColorElement, SVGAnimateMotionElement and SVGAnimateTransformElement.
[Value("SVGAnimationElement")]
public class SVGAnimationElement : SVGElement, ElementCSSInlineStyle, GlobalEventHandlers, SVGElementInstance, HTMLOrSVGElement, SVGTests
- Inheritance
-
SVGAnimationElement
- Implements
- Derived
- Inherited Members
Remarks
Constructors
SVGAnimationElement()
public SVGAnimationElement()
Properties
Onbegin
[Value("onbegin")]
public EventHandlerNonNull Onbegin { get; set; }
Property Value
Onend
[Value("onend")]
public EventHandlerNonNull Onend { get; set; }
Property Value
Onrepeat
[Value("onrepeat")]
public EventHandlerNonNull Onrepeat { get; set; }
Property Value
TargetElement
The targetElement read-only property of the SVGAnimationElement interface refers to the element which is being animated. If no target element is being animated (for example, because the {{SVGAttr("href")}} attribute specifies an unknown element), the value returned is null.
[Value("targetElement")]
public SVGElement? TargetElement { get; }
Property Value
- SVGElement
An SVGElement object.
Remarks
Methods
BeginElement()
The SVGAnimationElement method 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).
[Value("beginElement")]
public GlobalObject.Undefined BeginElement()
Returns
- GlobalObject.Undefined
None
Remarks
BeginElementAt(Number)
The SVGAnimationElement method 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.
[Value("beginElementAt")]
public GlobalObject.Undefined BeginElementAt(Number offset)
Parameters
offsetNumber
Returns
- GlobalObject.Undefined
None
Remarks
EndElement()
The SVGAnimationElement method 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).
[Value("endElement")]
public GlobalObject.Undefined EndElement()
Returns
- GlobalObject.Undefined
None
Remarks
EndElementAt(Number)
The SVGAnimationElement method 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.
[Value("endElementAt")]
public GlobalObject.Undefined EndElementAt(Number offset)
Parameters
offsetNumber
Returns
- GlobalObject.Undefined
None
Remarks
GetCurrentTime()
The SVGAnimationElement method getCurrentTime() returns a float representing the current time in seconds relative to time zero for the given time container.
[Value("getCurrentTime")]
public Number GetCurrentTime()
Returns
- Number
A float.
Remarks
Time zero refers to the moment when the time container begins its timeline. It acts as the starting reference point for all animations within that container.
A time container is an element or context that defines a local timeline for one or more animations. Animations inside the time container are measured relative to its timeline. If a time container is delayed, paused, or manipulated, all animations within it adjust accordingly.
GetSimpleDuration()
The SVGAnimationElement method getSimpleDuration() returns a float representing the number of seconds for the simple duration for this animation.
[Value("getSimpleDuration")]
public Number GetSimpleDuration()
Returns
- Number
A float.
Remarks
Simple duration refers to the length of time an animation is supposed to run for a single iteration, without considering repeats, restarts, or extensions.
This property reflects the {{SVGAttr("dur")}} attribute of the animate, animateMotion or animateTransform element.
GetStartTime()
The SVGAnimationElement method getStartTime() returns a float representing the start time, in seconds, for this animation element's current interval, if it exists, regardless of whether the interval has begun yet.
[Value("getStartTime")]
public Number GetStartTime()
Returns
- Number
A float.
Remarks
The start time returned by getStartTime() is measured in seconds relative to the time container's time zero.
Time zero refers to the moment when the time container begins its timeline. It acts as the starting reference point for all animations within that container.
A time container is an element or context that defines a local timeline for one or more animations. Animations inside the time container are measured relative to its timeline. If a time container is delayed, paused, or manipulated, all animations within it adjust accordingly.
This property reflects the {{SVGAttr("begin")}} attribute of the animate, animateMotion or animateTransform element.