DOMStringList

The DOMString interface is a legacy type returned by some APIs and represents a non-modifiable list of strings (DOMString). Modern APIs use Array objects (in WebIDL: sequence<DOMString>) instead.

This interface is used in IndexedDB and in the Location API:

Instance properties

DOMStringList.length Read only

Returns the size of the list.

Instance methods

DOMStringList.item()

Returns a string from the list with the given index.

DOMStringList.contains()

Returns a boolean indicating whether the given string is in the list.

Specifications

Specification
HTML Standard
# the-domstringlist-interface

Browser compatibility

BCD tables only load in the browser