DOMTokenList

JS
1.1
abstract class DOMTokenList : ItemArrayLike<String>

Exposes the JavaScript DOMTokenList to Kotlin

Constructors

JS
1.1

<init>

Exposes the JavaScript DOMTokenList to Kotlin

DOMTokenList()

Properties

JS
1.1

length

open val length: Int
JS
1.1

value

open var value: String

Functions

JS
1.1

add

fun add(vararg tokens: String)
JS
1.1

contains

fun contains(token: String): Boolean
JS
1.1

item

open fun item(index: Int): String?
JS
1.1

remove

fun remove(vararg tokens: String)
JS
1.1

replace

fun replace(token: String, newToken: String)
JS
1.1

supports

fun supports(token: String): Boolean
JS
1.1

toggle

fun toggle(
    token: String,
    force: Boolean = definedExternally
): Boolean

Extension Functions

JS
1.1

asList

Returns the view of this ItemArrayLike<T> collection as List<T>

fun <T> ItemArrayLike<T>.asList(): List<T>
JS
1.1

get

operator fun DOMTokenList.get(index: Int): String?