DOMTokenList object

Represents an underlying string that consists of a set of space-separated tokens.

Syntax


myTokenList.add(myToken);

DOM Information

Inheritance Hierarchy

The DOMTokenList does not inherit from any class or interface.

Members

The DOMTokenList object has these types of members:

Methods

The DOMTokenList object has these methods.

MethodDescription
contains

Returns true if the token is present; false otherwise.

toggle

Adds a token if it is not present, or removes it if it is. Returns true if the token is now present (it was added); returns false if it is not (it was removed).

toString

Stringifies the token list.

 

Remarks

A DOMTokenList object will stringify to the value of the DOMTokenList object's underlying string.

A set of space-separated tokens is a string containing zero or more words (known as tokens) separated by one or more space characters, where words consist of any string of one or more characters, none of which are space characters (the space characters are U+0020 SPACE, U+0009 CHARACTER TABULATION (tab), U+000A LINE FEED (LF), U+000C FORM FEED (FF), and U+000D CARRIAGE RETURN (CR)).

 

 

Show:
© 2014 Microsoft. All rights reserved.