Table of Contents

Class SVGLengthList

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The SVGLengthList interface defines a list of SVGLength objects. It is used for the BaseVal and AnimVal properties of SVGAnimatedLengthList.

[Value("SVGLengthList")]
public class SVGLengthList
Inheritance
SVGLengthList
Inherited Members

Remarks

An SVGLengthList object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.

An SVGLengthList object is indexable and can be accessed like an array.

-SVGNumberList
-SVGPointList
-SVGStringList
-SVGTransformList

See also on MDN

Constructors

SVGLengthList()

public SVGLengthList()

Properties

Length

The length property of the SVGLengthList interface returns the number of items in the list. It is an alias of NumberOfItems to make SVG lists more array-like.

[Value("length")]
public ulong Length { get; }

Property Value

ulong

A non-negative integer that represents the number of items in the list.

Remarks

NumberOfItems

The numberOfItems property of the SVGLengthList interface returns the number of items in the list. Length is an alias of it.

[Value("numberOfItems")]
public ulong NumberOfItems { get; }

Property Value

ulong

A non-negative integer that represents the number of items in the list.

Remarks

Methods

AppendItem(SVGLength)

The appendItem() method of the SVGLengthList interface inserts a new item at the end of the list. If the given item is already in a list, it is removed from its previous list before it is inserted into this list. The inserted item is the item itself and not a copy.

[Value("appendItem")]
public SVGLength AppendItem(SVGLength newItem)

Parameters

newItem SVGLength

Returns

SVGLength

The SVGLength that was added to the list.

Remarks

Clear()

The clear() method of the SVGLengthList interface clears all existing items from the list, with the result being an empty list.

[Value("clear")]
public GlobalObject.Undefined Clear()

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

Initialize(SVGLength)

The initialize() method of the SVGLengthList interface clears all existing items from the list and re-initializes the list to hold the single item specified by the parameter. If the inserted item is already in a list, it is removed from its previous list before it is inserted into this list. The inserted item is the item itself and not a copy. The return value is the item inserted into the list.

[Value("initialize")]
public SVGLength Initialize(SVGLength newItem)

Parameters

newItem SVGLength

Returns

SVGLength

The SVGLength that was added to the list.

Remarks

InsertItemBefore(SVGLength, ulong)

The insertItemBefore() method of the SVGLengthList interface inserts a new item into the list at the specified position. The first item is indexed 0. The inserted item is the item itself and not a copy.

[Value("insertItemBefore")]
public SVGLength InsertItemBefore(SVGLength newItem, ulong index)

Parameters

newItem SVGLength
index ulong

Returns

SVGLength

The SVGLength that was added to the list.

Remarks

RemoveItem(ulong)

The removeItem() method of the SVGLengthList interface removes an existing item at the given index from the list.

[Value("removeItem")]
public SVGLength RemoveItem(ulong index)

Parameters

index ulong

Returns

SVGLength

The SVGLength that was removed from the list.

Remarks

ReplaceItem(SVGLength, ulong)

The replaceItem() method of the SVGLengthList interface replaces an existing item in the list with a new item. If the new item is already in a list, it is removed from its previous list before it is inserted into this list. The inserted item is the item itself and not a copy. If the item is already in this list, note that the index of the item to replace is before the removal of the item.

[Value("replaceItem")]
public SVGLength ReplaceItem(SVGLength newItem, ulong index)

Parameters

newItem SVGLength
index ulong

Returns

SVGLength

The SVGLength that was added the list.

Remarks