A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/dom/DOMTokenList below:

DOMTokenList · WebPlatform Docs

DOMTokenList Summary

Represents a space-separated token list within the DOM, such as the contents of the className property of an element, treated as a zero-based array-like object. DOMTokenList objects are case-sensitive, even when the underlying string might ordinarily be treated in a case-insensitive manner.

Properties
length
Returns the number of tokens in a DOMTokenList.
Methods
add
Adds one or more tokens to a DOMTokenList.
contains
Tests if a token is part of a DOMTokenList.
remove
Removes one or more tokens from a DOMTokenList.
toggle
Adds a token to a DOMTokenList if it is not present, or removes it if it is. Returns true if the token is now present (it was added); returns false if it is not (it was removed).
item
Returns a specific zero-indexed token from a DOMTokenList.
Events

No events.

Notes

A DOMTokenList object will stringify to the value of the DOMTokenList object’s underlying string. A set of space-separated tokens is a string containing zero or more words (known as tokens) separated by one or more space characters, where words consist of any string of one or more characters, none of which are space characters (the space characters are U+0020 SPACE, U+0009 CHARACTER TABULATION (tab), U+000A LINE FEED (LF), U+000C FORM FEED (FF), and U+000D CARRIAGE RETURN (CR)).

Related specifications
W3C DOM4
Candidate Recommendation
Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4