DOMTokenList class

DOMTokenList class

The DOMTokenList class represents a set of space-separated tokens. It is indexed beginning with 0 as with JavaScript Array objects. DOMTokenList is always case-sensitive.

Inheritance: DOMTokenListDOMObject

The DOMTokenList type exposes the following members:

Properties

PropertyDescription
lengthReturns an ulong which represents the number of tokens stored in this list.
valueGets or sets the value of a corresponding attribute.

Indexer

NameDescription
[index]

Methods

MethodDescription
toggleRemoves the token from the list if it exists, or adds the token to the list if it doesn’t.
toggleRemoves the token from the list if it exists, or adds the token to the list if it doesn’t.
get_platform_typeThis method is used to retrieve ECMAScript object Type.
containsReturns true if the list contains the given token, otherwise false.
addAdds the specified token(s) to the list.
removeRemoves the specified token(s) from the list.
replaceReplaces an existing token with a new token. Does nothing if the first token doesn’t exist.
supportsReturns true if a given token is in the associated attribute’s supported tokens.

See Also