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/add below:

add ยท WebPlatform Docs

add Summary

Adds one or more tokens to a DOMTokenList.

Method of dom/DOMTokenListdom/DOMTokenList

Syntax
var result = element.add(token);
Parameters token
Data-type
String

The token to add to the DOMTokenList.

Return Value

Returns an object of type BooleanBoolean

Examples
//adds an item to an element's classList (a DOMTokenList)
function elAddItem(elid,itemadd) {
  var classes = document.getElementById(elid).classList;
  classes.add(itemadd);
}
Related specifications
W3C DOM4
Candidate Recommendation

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