A type returned by some APIs which contains a list of DOMString (strings).

interface DOMStringList {
    length: number;
    contains(string: string): boolean;
    item(index: number): null | string;
    [index: number]: string;
}

可索引

  • [index: number]: string

属性

方法

属性

length: number

Returns the number of strings in strings.

方法

  • Returns true if strings contains string, and false otherwise.

    参数

    • string: string

    返回 boolean

  • Returns the string with index index from strings.

    参数

    • index: number

    返回 null | string