DOMTokenList

Overview

The DOMTokenList interface represents 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.

Location

 

add

Adds the specified token(s) to the list.

 

method add(partoken: dynamic)

 

void add(dynamic partoken)

 

func add(_ partoken: dynamic)

 

void add(dynamic partoken)

 

Sub add(partoken As dynamic)

Parameters:

  • partoken:

contains

Returns true if the list contains the given token, otherwise false.

 

method contains(partoken: dynamic): Boolean

 

Boolean contains(dynamic partoken)

 

func contains(_ partoken: dynamic) -> Boolean

 

Boolean contains(dynamic partoken)

 

Function contains(partoken As dynamic) As Boolean

Parameters:

  • partoken:

entries

Returns an iterator, allowing you to go through all key/value pairs contained in this object.

 

method entries: dynamic

 

dynamic entries()

 

func entries() -> dynamic

 

dynamic entries()

 

Function entries() As dynamic

forEach

Executes a provided callback function once per DOMTokenList element.

 

method forEach(parcallback: dynamic; parcurrentValue: dynamic; parcurrentIndex: dynamic; parlistObj: dynamic)

 

void forEach(dynamic parcallback, dynamic parcurrentValue, dynamic parcurrentIndex, dynamic parlistObj)

 

func forEach(_ parcallback: dynamic, _ parcurrentValue: dynamic, _ parcurrentIndex: dynamic, _ parlistObj: dynamic)

 

void forEach(dynamic parcallback, dynamic parcurrentValue, dynamic parcurrentIndex, dynamic parlistObj)

 

Sub forEach(parcallback As dynamic, parcurrentValue As dynamic, parcurrentIndex As dynamic, parlistObj As dynamic)

Parameters:

  • parcallback:
  • parcurrentValue:
  • parcurrentIndex:
  • parlistObj:

item

 

property item[parindex: Int32]: dynamic read write;

 

dynamic item[Int32 parindex] { get; set; }

 

subscript item(_ parindex: Int32) -> dynamic { get{} set{} }

 

dynamic item[Int32 parindex] { __get; __set; }

 

Property item(parindex As Int32) As dynamic

keys

Returns an iterator, allowing you to go through all keys of the key/value pairs contained in this object.

 

method keys: dynamic

 

dynamic keys()

 

func keys() -> dynamic

 

dynamic keys()

 

Function keys() As dynamic

length

 

property length: Int32 read;

 

Int32 length { get; }

 

var length: Int32 { get{} }

 

Int32 length { __get; }

 

ReadOnly Property length() As Int32

remove

Removes the specified token(s) from the list.

 

method remove(partoken: dynamic)

 

void remove(dynamic partoken)

 

func remove(_ partoken: dynamic)

 

void remove(dynamic partoken)

 

Sub remove(partoken As dynamic)

Parameters:

  • partoken:

replace

Replaces token with newToken.

 

method replace(paroldToken: dynamic; parnewToken: dynamic)

 

void replace(dynamic paroldToken, dynamic parnewToken)

 

func replace(_ paroldToken: dynamic, _ parnewToken: dynamic)

 

void replace(dynamic paroldToken, dynamic parnewToken)

 

Sub replace(paroldToken As dynamic, parnewToken As dynamic)

Parameters:

  • paroldToken:
  • parnewToken:

toggle

Removes token from the list if it exists, or adds token to the list if it doesn't. Returns a boolean indicating whether token is in the list after the operation.

 

method toggle(partoken: dynamic; parforce: dynamic): Boolean

 

Boolean toggle(dynamic partoken, dynamic parforce)

 

func toggle(_ partoken: dynamic, _ parforce: dynamic) -> Boolean

 

Boolean toggle(dynamic partoken, dynamic parforce)

 

Function toggle(partoken As dynamic, parforce As dynamic) As Boolean

Parameters:

  • partoken:
  • parforce:

value

 

property value: String read write;

 

String value { get; set; }

 

var value: String { get{} set{} }

 

String value { __get; __set; }

 

Property value() As String

values

Returns an iterator, allowing you to go through all values of the key/value pairs contained in this object.

 

method values: dynamic

 

dynamic values()

 

func values() -> dynamic

 

dynamic values()

 

Function values() As dynamic

 

item

 

property item[parindex: Int32]: dynamic read write;

 

dynamic item[Int32 parindex] { get; set; }

 

subscript item(_ parindex: Int32) -> dynamic { get{} set{} }

 

dynamic item[Int32 parindex] { __get; __set; }

 

Property item(parindex As Int32) As dynamic

length

 

property length: Int32 read;

 

Int32 length { get; }

 

var length: Int32 { get{} }

 

Int32 length { __get; }

 

ReadOnly Property length() As Int32

value

 

property value: String read write;

 

String value { get; set; }

 

var value: String { get{} set{} }

 

String value { __get; __set; }

 

Property value() As String

 

add

Adds the specified token(s) to the list.

 

method add(partoken: dynamic)

 

void add(dynamic partoken)

 

func add(_ partoken: dynamic)

 

void add(dynamic partoken)

 

Sub add(partoken As dynamic)

Parameters:

  • partoken:

contains

Returns true if the list contains the given token, otherwise false.

 

method contains(partoken: dynamic): Boolean

 

Boolean contains(dynamic partoken)

 

func contains(_ partoken: dynamic) -> Boolean

 

Boolean contains(dynamic partoken)

 

Function contains(partoken As dynamic) As Boolean

Parameters:

  • partoken:

entries

Returns an iterator, allowing you to go through all key/value pairs contained in this object.

 

method entries: dynamic

 

dynamic entries()

 

func entries() -> dynamic

 

dynamic entries()

 

Function entries() As dynamic

forEach

Executes a provided callback function once per DOMTokenList element.

 

method forEach(parcallback: dynamic; parcurrentValue: dynamic; parcurrentIndex: dynamic; parlistObj: dynamic)

 

void forEach(dynamic parcallback, dynamic parcurrentValue, dynamic parcurrentIndex, dynamic parlistObj)

 

func forEach(_ parcallback: dynamic, _ parcurrentValue: dynamic, _ parcurrentIndex: dynamic, _ parlistObj: dynamic)

 

void forEach(dynamic parcallback, dynamic parcurrentValue, dynamic parcurrentIndex, dynamic parlistObj)

 

Sub forEach(parcallback As dynamic, parcurrentValue As dynamic, parcurrentIndex As dynamic, parlistObj As dynamic)

Parameters:

  • parcallback:
  • parcurrentValue:
  • parcurrentIndex:
  • parlistObj:

keys

Returns an iterator, allowing you to go through all keys of the key/value pairs contained in this object.

 

method keys: dynamic

 

dynamic keys()

 

func keys() -> dynamic

 

dynamic keys()

 

Function keys() As dynamic

remove

Removes the specified token(s) from the list.

 

method remove(partoken: dynamic)

 

void remove(dynamic partoken)

 

func remove(_ partoken: dynamic)

 

void remove(dynamic partoken)

 

Sub remove(partoken As dynamic)

Parameters:

  • partoken:

replace

Replaces token with newToken.

 

method replace(paroldToken: dynamic; parnewToken: dynamic)

 

void replace(dynamic paroldToken, dynamic parnewToken)

 

func replace(_ paroldToken: dynamic, _ parnewToken: dynamic)

 

void replace(dynamic paroldToken, dynamic parnewToken)

 

Sub replace(paroldToken As dynamic, parnewToken As dynamic)

Parameters:

  • paroldToken:
  • parnewToken:

toggle

Removes token from the list if it exists, or adds token to the list if it doesn't. Returns a boolean indicating whether token is in the list after the operation.

 

method toggle(partoken: dynamic; parforce: dynamic): Boolean

 

Boolean toggle(dynamic partoken, dynamic parforce)

 

func toggle(_ partoken: dynamic, _ parforce: dynamic) -> Boolean

 

Boolean toggle(dynamic partoken, dynamic parforce)

 

Function toggle(partoken As dynamic, parforce As dynamic) As Boolean

Parameters:

  • partoken:
  • parforce:

values

Returns an iterator, allowing you to go through all values of the key/value pairs contained in this object.

 

method values: dynamic

 

dynamic values()

 

func values() -> dynamic

 

dynamic values()

 

Function values() As dynamic