Skip to content

HTMLCollection

Types

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. See HTMLCollection on MDN

type t<'item> = private {length: int}

Record fields

length
int

Sets or retrieves the number of objects in a collection. Read more on MDN

Values

item

Retrieves an object from various collections. Read more on MDN

let item: (t<'item>, int) => Null.t<'item>

Parameters

tint

Return type

Stdlib.Null.t

namedItem

Retrieves a select object or an object from an options collection. Read more on MDN

let namedItem: (t<'item>, string) => Null.t<'item>

Parameters

tstring

Return type

Stdlib.Null.t