aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/domstringlist/index.md
blob: 2ea3072d6ec861a2366103aee9ccbedd75fc47e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
title: DOMStringList
slug: Web/API/DOMStringList
tags:
  - API
  - Chaînes de caractères
  - DOM
  - Types
translation_of: Web/API/DOMStringList
---
{{ APIRef("DOM") }}

Un type renvoyé par certaines API contenant une liste de [DOMString](/fr/docs/Web/API/DOMString) (_chaînes de caractères_).

## Propriétés

- {{domxref("DOMStringList.length")}} {{ReadOnlyInline}}
  - : Renvoie la longueur de la liste.

## Méthodes

- {{domxref("DOMStringList.item()")}}
  - : Renvoie une {{domxref("DOMString")}} (_chaîne de caractères_).
- {{domxref("DOMStringList.contains()")}}
  - : Renvoie un {{jsxref("Boolean")}} (_booléen_) indiquant si la chaîne de caractères donnée est dans la liste.

## Spécifications

| Spécification                                                                                                                            | Statut                           | Commentaire           |
| ---------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | --------------------- |
| {{SpecName("HTML WHATWG", "common-dom-interfaces.html#the-domstringlist-interface", "DOMStringList")}} | {{Spec2("HTML WHATWG")}} | Définition  initiale. |