Class SVGStringList
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The SVGStringList interface defines a list of strings.
[Value("SVGStringList")]
public class SVGStringList
- Inheritance
-
SVGStringList
- Inherited Members
Remarks
An SVGStringList object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
An SVGStringList object is indexable and can be accessed like an array.
Constructors
SVGStringList()
public SVGStringList()
Properties
Length
The length property of the SVGStringList 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 SVGStringList 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(string)
The appendItem() method of the SVGStringList 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 string AppendItem(string newItem)
Parameters
newItemstring
Returns
- string
The string that was added to the list.
Remarks
Clear()
The clear() method of the SVGStringList interface clears all existing items from the list, with the result being an empty list.
[Value("clear")]
public GlobalObject.Undefined Clear()
Returns
Remarks
Initialize(string)
The initialize() method of the SVGStringList 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 string Initialize(string newItem)
Parameters
newItemstring
Returns
- string
The string that was added to the list.
Remarks
InsertItemBefore(string, ulong)
The insertItemBefore() method of the SVGStringList 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 string InsertItemBefore(string newItem, ulong index)
Parameters
Returns
- string
The string that was added to the list.
Remarks
RemoveItem(ulong)
The removeItem() method of the SVGStringList interface removes an existing item at the given index from the list.
[Value("removeItem")]
public string RemoveItem(ulong index)
Parameters
indexulong
Returns
- string
The string that was removed from the list.
Remarks
ReplaceItem(string, ulong)
The replaceItem() method of the SVGStringList interface replaces an existing item in the list with a new item. The inserted item is the item itself and not a copy.
[Value("replaceItem")]
public string ReplaceItem(string newItem, ulong index)
Parameters
Returns
- string
The string that was added the list.