DOMSettableTokenList : DOMTokenList
Return to: HTML DOM Level 5 index

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

Platform Support

Mozilla Chrome Safari Opera IE Netscape
1.0+ 5.0+ 1.0+ 5.0+ 4.0+ 6.0+

Constructors

Constructor Action Mozilla Chrome Safari Opera IE Netscape
DOMSettableTokenList Constructor() : DOMSettableTokenList
Creates an instance of the DOMSettableTokenList.
Show Details 1.0+ 5.0+ 1.0+ 5.0+ 4.0+ 6.0+

DOMSettableTokenList() : DOMSettableTokenList

Creates an instance of the DOMSettableTokenList.

Returns
DOMSettableTokenList

Visibility
internal

Inherited Properties

Property Action Mozilla Chrome Safari Opera IE Netscape
length : Number
Returns the number of tokens in the string.
Show Details 1.0+ 5.0+ 1.0+ 5.0+ 4.0+ 6.0+
Availability

WhatWG

Properties

Property Action Mozilla Chrome Safari Opera IE Netscape
value : Boolean
Returns the underlying string on getting, and must replace the underlying string with the new value on setting.
Show Details 1.0+ 5.0+ 1.0+ 5.0+ 4.0+ 6.0+
Availability

WhatWG

Inherited Functions

Method Action Mozilla Chrome Safari Opera IE Netscape
item(String index) : String
Returns the token with specified index. The tokens are returned in the order they are found in the underlying string.
Show Details 1.0+ 5.0+ 1.0+ 5.0+ 4.0+ 6.0+

Parameters
String index The index of a token.

Returns
String

Availability

WhatWG

contains(String token) : Boolean
Returns true if the token is present; false otherwise.
Show Details 1.0+ 5.0+ 1.0+ 5.0+ 4.0+ 6.0+

Parameters
String token The specified token.

Returns
Boolean

Availability

WhatWG

add(String token) : void
Adds token, unless it is already present.
Show Details 1.0+ 5.0+ 1.0+ 5.0+ 4.0+ 6.0+

Parameters
String token The token to be added.

Availability

WhatWG

remove(String token) : void
Removes token if it is present.
Show Details 1.0+ 5.0+ 1.0+ 5.0+ 4.0+ 6.0+

Parameters
String token The token to be removed.

Availability

WhatWG

toggle(String token) : Boolean
Adds token if it is not present, or removes it if it is. Returns true if token is now present (it was added); returns false if it is not (it was removed).
Show Details 1.0+ 5.0+ 1.0+ 5.0+ 4.0+ 6.0+

Parameters
String token The token to be added or removed.

Returns
Boolean

Availability

WhatWG

References

DOMSettableTokenList

Availability

JavaScript 1.2|WhatWG

text_javascript aptana_docs