DOMTokenList class

The interface represents a set of space-separated tokens. Such a set is returned by Element.classList or HTMLLinkElement.relList, and many others. A is indexed beginning with 0 as with JavaScript Array objects. is always case-sensitive.

Inheritance
Available extensions
Annotations
  • @JS.new()
  • @staticInterop

Constructors

DOMTokenList()
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
length → int

Available on DOMTokenList, provided by the PropsDOMTokenList extension

no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value ↔ String

Available on DOMTokenList, provided by the PropsDOMTokenList extension

getter/setter pair

Methods

add([String? tokens1, String? tokens2, String? tokens3]) → void

Available on DOMTokenList, provided by the PropsDOMTokenList extension

contains(String token) → bool

Available on DOMTokenList, provided by the PropsDOMTokenList extension

item(int index) → String?

Available on DOMTokenList, provided by the PropsDOMTokenList extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove([String? tokens1, String? tokens2, String? tokens3]) → void

Available on DOMTokenList, provided by the PropsDOMTokenList extension

replace(String token, String newToken) → bool

Available on DOMTokenList, provided by the PropsDOMTokenList extension

supports(String token) → bool

Available on DOMTokenList, provided by the PropsDOMTokenList extension

toggle(String token, [bool? force]) → bool

Available on DOMTokenList, provided by the PropsDOMTokenList extension

toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited