---
title: "DOMStringList | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

# Interface DOMStringList

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

[MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMStringList)

interface DOMStringList {  
    [length](#length): number;  
    ["\[iterator\]"](#iterator-1)(): [ArrayIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ArrayIterator/)<string\>;  
    [contains](#contains-1)(string: string): boolean;  
    [item](#item-1)(index: number): string | null;  
    \[index: number\]: string;  
}

#### Indexable

-   \[index: number\]: string
    

##### Index

### Properties[](#properties)

[length](#length)

### Methods[](#methods)

[\[iterator\]](#iterator) [contains](#contains) [item](#item)

## Properties[](#properties-1)

### `Readonly`length[](#length)

length: number

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

[MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMStringList/length)

## Methods[](#methods-1)

### \[iterator\][](#iterator)

-   "\[iterator\]"(): [ArrayIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ArrayIterator/)<string\>[](#iterator-1)
    
    #### Returns [ArrayIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ArrayIterator/)<string\>
    

### contains[](#contains)

-   contains(string: string): boolean[](#contains-1)
    
    The **`contains()`** method returns a boolean indicating whether the given string is in the list.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMStringList/contains)
    
    #### Parameters
    
    -   string: string
    
    #### Returns boolean
    

### item[](#item)

-   item(index: number): string | null[](#item-1)
    
    The **`item()`** method returns a string from a DOMStringList by index.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMStringList/item)
    
    #### Parameters
    
    -   index: number
    
    #### Returns string | null
