JavaScripture
Contribute via GitHub Feedback

JavaScript DOMTokenList : Object

Instance Indexers

this[index : Number] : String

Retrieves the token at index. You can also use the item() method.

Example:

Run

Results:

 

Instance Properties

length : Number  

Example:

Run

Results:

 

Instance Methods

add(token : String) : undefined

Example:

Run

Results:

 

contains(token : String) : Boolean

Example:

Run

Results:

 

item(index : Number) : String

Same as this[index].

remove(token : String) : undefined

Example:

Run

Results:

 

toggle(token : String) : Boolean

Example:

Run

Results: