Skip to main content

DOMStringList

The DOMStringList interface is a legacy type returned by some APIs and represents a non-modifiable list of strings (DOMString).

MDN Reference

Indexable

[index: number]: string

Methods

[iterator]()

iterator: ArrayIterator<string>;

Returns

ArrayIterator<string>


contains()

contains(string): boolean;

The contains() method returns a boolean indicating whether the given string is in the list.

MDN Reference

Parameters

ParameterType
stringstring

Returns

boolean


item()

item(index): string | null;

The item() method returns a string from a DOMStringList by index.

MDN Reference

Parameters

ParameterType
indexnumber

Returns

string | null

Properties

length

readonly length: number;

The read-only length property indicates the number of strings in the DOMStringList.

MDN Reference