JavaScript – DOMTokenList add() Method
The DOMTokenList add() method adds one or more tokens to a DOMTokenList, which is a set of space-separated tokens that can be accessed by index.
The DOMTokenList add() method adds one or more tokens to a DOMTokenList, which is a set of space-separated tokens that can be accessed by index.
The DOMTokenList contains() method returns “true” if a DOMTokenList contains a class. If not, it will return “false”.
The DOMTokenList entries() method returns an iterator with the key/value pairs from a DOMTokenList.
The DOMTokenList forEach() method executes a callback function for each token in a DOMTokenList.
The DOMTokenList item() method returns the token at a specified index in a DOMTokenList.
The DOMTokenList keys() method returns an iterator with the keys from a DOMTokenList.
The DOMTokenList length property returns the number of tokens in a DOMTokenList.
The DOMTokenList remove() method removes tokens from the DOMTokenList, which is a set of space separated tokens that can be accessed by index.
The DOMTokenList replace() method replaces a token in a DOMTokenList, which is a set of space separated tokens that can be accessed by index.
The DOMTokenList supports() method returns “true” if a token in a DOMTokenList is one of the attribute’s supported tokens.
The DOMTokenList toggle() method toggles a token in a DOMTokenList on or off.
The DOMTokenList value property returns a DOMTokenList as a string
The DOMTokenList values() method returns an iterator with the keys from a DOMTokenList.