Chartbreaker
    Preparing search index...

    Interface SVGStringList

    The SVGStringList interface defines a list of strings.

    MDN Reference

    interface SVGStringList {
        length: number;
        numberOfItems: number;
        "[iterator]"(): ArrayIterator<string>;
        appendItem(newItem: string): string;
        clear(): void;
        getItem(index: number): string;
        initialize(newItem: string): string;
        insertItemBefore(newItem: string, index: number): string;
        removeItem(index: number): string;
        replaceItem(newItem: string, index: number): string;
        [index: number]: string;
    }

    Indexable

    • [index: number]: string
    Index

    Properties

    length: number

    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.

    MDN Reference

    numberOfItems: number

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

    MDN Reference

    Methods

    • 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.

      MDN Reference

      Parameters

      • newItem: string

      Returns string

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

      MDN Reference

      Returns void

    • The getItem() method of the SVGStringList interface returns the specified item from the list. The returned item is the item itself and not a copy. Any changes made to the item are immediately reflected in the list. The first item is indexed 0.

      MDN Reference

      Parameters

      • index: number

      Returns 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.

      MDN Reference

      Parameters

      • newItem: string

      Returns string

    • 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.

      MDN Reference

      Parameters

      • newItem: string
      • index: number

      Returns string

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

      MDN Reference

      Parameters

      • index: number

      Returns string

    • 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.

      MDN Reference

      Parameters

      • newItem: string
      • index: number

      Returns string