classList
Summary
Reflects the class attribute as an ordered list of the whitespace separated class names and has convenience methods for add, remove, contains and more.
Property of dom/Elementdom/Element
Syntax
Note: This property is read-only.
var classList = element.classList;
Return Value
Returns an object of type
A DOMTokenList representing the class names of the element.
Related specifications
- WHATWG DOM
- Living Standard
- DOM4
- Working Draft
See also
Related pages
- HTMLElementHTMLElement
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]