W3cubDocs

/Haxe JavaScript

DOMTokenList

package js.html

Available on js

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:

Variables

read only length: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

© 2005–2016 Haxe Foundation
Licensed under a MIT license.
http://api.haxe.org/js/html/DOMTokenList.html