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> = WebAPI.DOMTree.htmlCollection<
'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

t<'item>
int

Return type

Null.t<'item>

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

t<'item>
string

Return type

Null.t<'item>