DOMTokenList class

A set of space-separated tokens. Such a set is returned by Element.classList, HTMLLinkElement.relList, HTMLAnchorElement.relList, HTMLAreaElement.relList, HTMLIframeElement.sandbox, or HTMLOutputElement.htmlFor. It is indexed beginning with 0 as with JavaScript Array objects. DOMTokenList is always case-sensitive.

MDN Reference

Available extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

DOMTokenList()
factory

Properties

add ↔ void Function([Iterable?])

Available on DOMTokenList, provided by the DOMTokenList$Typings extension

getter/setter pair
contains bool Function(String)

Available on DOMTokenList, provided by the DOMTokenList$Typings extension

getter/setter pair
forEach ↔ void Function(void (String, num, DOMTokenList), [dynamic])

Available on DOMTokenList, provided by the DOMTokenList$Typings extension

getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
item String? Function(num)

Available on DOMTokenList, provided by the DOMTokenList$Typings extension

getter/setter pair
length num

Available on DOMTokenList, provided by the DOMTokenList$Typings extension

Returns the number of tokens.
no setter
remove ↔ void Function([Iterable?])

Available on DOMTokenList, provided by the DOMTokenList$Typings extension

getter/setter pair
replace bool Function(String, String)

Available on DOMTokenList, provided by the DOMTokenList$Typings extension

getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supports bool Function(String)

Available on DOMTokenList, provided by the DOMTokenList$Typings extension

getter/setter pair
toggle bool Function(String, [bool?])

Available on DOMTokenList, provided by the DOMTokenList$Typings extension

getter/setter pair
toString$ String Function()

Available on DOMTokenList, provided by the DOMTokenList$Typings extension

getter/setter pair
value String

Available on DOMTokenList, provided by the DOMTokenList$Typings extension

Returns the associated set as string.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](num index) String

Available on DOMTokenList, provided by the DOMTokenList$Typings extension

operator []=(num index, String value) → void

Available on DOMTokenList, provided by the DOMTokenList$Typings extension