DOMTokenList : Object
An object containing a list of strings. Used in
%%/Element#classList|**Element.classList**%% and
%%/HTMLIFrameElement#sandbox|**HTMLIFrameElement.sandbox**%%.
Spec:
https://dom.spec.whatwg.org/#domtokenlist
----
instance[index : Number] : String
Retrieves the token at **index**. You can also use the %%#item|**item()**%% method.
foo
----
instance.length : Number
The number of tokens in **this**.
foo
ReadOnly:
true
Spec:
https://dom.spec.whatwg.org/#dom-domtokenlist-length
----
instance.value : String
A string value of the token list.
See also %%/Element#className|className%%.
foo
Spec:
https://dom.spec.whatwg.org/#dom-domtokenlist-value
----
prototype.item(index : Number) : String
Same as %%#indexer_Number|**this[index]**%%.
Spec:
https://dom.spec.whatwg.org/#dom-domtokenlist-item
----
prototype.add(token : String) : undefined
Adds **token** to **this**.
foo
Spec:
https://dom.spec.whatwg.org/#dom-domtokenlist-add
----
prototype.contains(token : String) : Boolean
Returns **true** if **token** is in **this** and
**false** otherwise.
foo
Spec:
https://dom.spec.whatwg.org/#dom-domtokenlist-contains
----
prototype.remove(token : String) : undefined
Removes **token** from **this**.
foo
Spec:
https://dom.spec.whatwg.org/#dom-domtokenlist-remove
----
prototype.replace(oldToken : String, newToken : String) : undefined
Removes **oldToken** from **this** and adds **newToken**.
foo
Spec:
https://dom.spec.whatwg.org/#dom-domtokenlist-replace
----
prototype.toggle(token : String, [value : Boolean]) : Boolean
If **value** is not specified, removes **token** from the list
if was in **this** or adds **token** to the list if it was not
in **this**. If **value** is **true**, **token** is added to
**this** if not already there. If **value** is **false**,
**token** is removed from **this**.
foo
Spec:
https://dom.spec.whatwg.org/#dom-domtokenlist-toggle