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 extends Element> {
    length: number;
    item(index: number): null | T;
    namedItem(name: string): null | T;
    [index: number]: T;
}

Type Parameters

  • T extends Element

Hierarchy (View Summary)

Indexable

  • [index: number]: T

Properties

Methods

Properties

length: number

Sets or retrieves the number of objects in a collection.

MDN Reference

Methods

  • Parameters

    • name: string

    Returns null | T