# class DOMTokenList

#### package js.html

Available on HTML5

The `DOMTokenList` interface represents a set of space-separated tokens. Such a set is returned by `Element.classList`, `HTMLLinkElement.relList`, `HTMLAnchorElement.relList` or `HTMLAreaElement.relList`. It is indexed beginning with `0` as with JavaScript `Array` objects. `DOMTokenList` is always case-sensitive.

Documentation DOMTokenList by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See:

https://developer.mozilla.org/en-US/docs/Web/API/DOMTokenList

### Variables

###

`read onlylength:Int`

Is an `integer` representing the number of objects stored in the object.

###

`value:String`

### Methods

###

`add (tokens:Rest<String>):Void`

Throws:

`null` | DOMError

###

`contains (token:String):Bool`

Throws:

`null` | DOMError

###

`item (index:Int):String`

Returns an item in the list by its index (or undefined if the number is greater than or equal to the length of the list, prior to `7.0` returned null)

###

`remove (tokens:Rest<String>):Void`

Throws:

`null` | DOMError

###

`toggle (token:String, ?force:Bool):Bool`

Throws:

`null` | DOMError