Interface HTMLCollectionOf<T>

A generic collection (array-like object similar to arguments) of elements (in document order) and offers methods and properties for selecting from the list.

MDN Reference

interface HTMLCollectionOf<T> {
    length: number;
    item(index): T;
    namedItem(name): T;
    [index: number]: T;
}

Type Parameters

Hierarchy (view full)

Indexable

[index: number]: T

Properties

Methods

Properties

length: number

Sets or retrieves the number of objects in a collection.

MDN Reference

Methods

  • Retrieves an object from various collections.

    MDN Reference

    Parameters

    • index: number

    Returns T

  • Parameters

    • name: string

    Returns T